#include int main() { __int64 v0,v; while(scanf("%I64d%I64d",&v,&v0)!=EOF) printf("%I64d\n",2*v-v0); return 0; }