#include <bits/stdc++.h>
#define lol long long
using namespace std;
int main(){
    int a,b,c;
    string s,t,q;
    cin>>a>>b;
    cout<<a+(b-a)*2<<"\n";
    return(0);
}
#include <bits/stdc++.h>
using namespace std;

#define loop(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) for (int i = 0; i < n; ++i)
#define dump(a) cerr << #a << " = " << (a) << "(L:" << __LINE__ << ")" << endl

void solve(long long A, long long B) {
    cout << A * B << endl;
}

int main() {
    long long A;
    scanf("%lld", &A);
    long long B;
    scanf("%lld", &B);
    solve(A, B);
    return 0;
}
