#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vs = vector<string>;
using msi = map<string, int>;
using mii = map<int, int>;
using psi = pair<string, int>;
using pii = pair<int, int>;
using vlai = valarray<int>;
template <class T>
ostream &operator<<(std::ostream &o, const vector<T> &v) {
  for (int i = 0; i < v.size(); i++) {
    o << (i > 0 ? " " : "") << v[i];
  }
  return o;
}
int main() {
  ll n, x;
  cin >> n >> x;
  cout << (n - 1) * 3 << endl;
}
