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