#include <bits/stdc++.h>
using namespace std;
using pint = pair<int, int>;
using pstr = pair<string, string>;
using vint = vector<int>;
using vstr = vector<string>;
int main() {
  int n, x;
  cin >> n >> x;
  cout << 2 * n + (n - 3);
  return 0;
}
