#include <bits/stdc++.h>
using namespace std;
const unsigned long long mod = 1e9 + 7;
template <typename T>
void vprint(T &v) {
  for (int i = 0; i < (int)v.size(); ++i) {
    cout << v[i] << " ";
  }
  cout << endl;
}
int main() {
  long long N;
  cin >> N;
  cout << 3 * (N - 1) << endl;
  return 0;
}
