#include <stdio.h>

int main() {
   int a,b,c=0;
   scanf("%d %d",&a,&b);
   c=2*b-a;
   printf("%d",c);





    return 0;
}