#include <stdio.h>

int main() {
    int a,b,c,d;
    scanf("%d%d",&a,&b);
    c=b-a;
    d=b+c;
    printf("%d",d);
    return 0;
}