#include <iostream> using namespace std; int main(){ int R1,R2,S; cin>>R1>>S; cout<<S*2-R1; return 0; }