#include <bits/stdc++.h>
using namespace std;
inline long long read(long long f = 1, int x = 0, char ch = ' ') {
  while (!isdigit(ch = getchar()))
    if (ch == '-') f = -1;
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return f * x;
}
int n, x;
int main() {
  n = read();
  printf("%d\n", 3 * (n - 1));
  return 0;
}
