#include<bits/stdc++.h> using namespace std; int main(){ int cin,cout; scanf("%d %d",&cin,&cout); printf("%d",cout+cout-cin); return 0; }