#include <bits/stdc++.h>
const int INF = 1e8;
const int MAXN = 3e5 + 200;
const long double eps = 1e-9;
const long double pi = acos(-1.0);
using namespace std;
const long long MOD = 998244353;
void solve() {
  long long n, x;
  cin >> n >> x;
  cout << 2 * n + x << endl;
}
int main() {
  ios::sync_with_stdio(NULL), cin.tie(0), cout.tie(0);
  cout.setf(ios::fixed), cout.precision(17);
  int step;
  step = 1;
  for (int i = 1; i <= step; i++) solve();
}
