#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int MOD = INF + 7;
int main(void) {
  long long N, X;
  cin >> N >> X;
  long long ans = N * 2 + X;
  cout << ans << endl;
  return 0;
}
