#include <stdio.h>

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