#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 17;
const int MOD = 1e9 + 7;
int main(int argc, char const *argv[]) {
  long long n, x;
  cin >> n >> x;
  cout << (n - 1) * 3 << endl;
  return 0;
}
