#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1e9;
const int MOD = (int)1e9 + 7;
const double PI = acos(-1);
template <class T>
inline T in_() {
  T x;
  cin >> x;
  return x;
}
signed main() {
  cout << ((in_<long long>() - 1) * 3) << endl;
  return 0;
}
