#include <bits/stdc++.h>
const int INF = 2147483647;
const long long int MOD = 1000000007;
using namespace std;
int main() {
  long long int n, x;
  cin >> n >> x;
  cout << 3LL * (n - 1LL) << endl;
}
