#include <bits/stdc++.h>
using namespace std;

int n;
long long rs;

int main() {
  ios_base::sync_with_stdio(0);

  cin >> n;

  if(n == 1) return cout << "3\n", 0;
  if(n == 2) return cout << "6\n", 0;

  rs = 6LL + (6LL * ((n - 2) / 2 + (n & 1)) + (3LL * ((n - 2) / 2)));

  cout << rs << '\n';

  return 0;
}