#include <bits/stdc++.h>
using namespace std;
static const long long maxLL = (long long)1 << 62;
const long long MOD = 1000000007, INF = 1e18;
long long dy[] = {-1, 0, 1, 0};
long long dx[] = {0, 1, 0, -1};
long long n;
signed main() {
  cin >> n;
  cout << (n - 1) * 3 << endl;
  return 0;
}
