#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e3 + 5;
const int intinf = 1 << 29;
const long long inf = 1ll << 60;
void GG() {
  cout << "No\n";
  exit(0);
}
vector<int> tree[maxn];
int nx = 0;
int k;
bool seen[maxn];
int dfs(int at, int left) {
  if (left < 0) return 0;
  seen[at] = 1;
  int re = 1;
  for (int &v : tree[at]) {
    if (!seen[v]) re += dfs(v, left - 1);
  }
  seen[at] = 0;
  return re;
}
int solve(int x) {
  int ex = 0, aa = 1;
  seen[x] = 1;
  for (int &v : tree[x]) {
    int a = dfs(v, k / 2 - 1), b = dfs(v, k / 2);
    aa += a;
    ex = max(ex, (__typeof__(ex))(b - a));
  }
  seen[x] = 0;
  return aa + ex;
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  cout << 3 * (n - 1) << endl;
}
