#include <bits/stdc++.h>

using namespace std;

int N;

int main() {
	// assert(freopen("tnt.in", "r", stdin));
	// assert(freopen("tnt.out", "w", stdout));
	cin.sync_with_stdio(false);

	cin >> N;

  long long ans;
  if (N % 2 == 1) {
    ans = 3LL * (N / 2 * 3 + 1);
  } else {
    ans = 3LL * (N / 2  * 3 - 1);
  }
  cout << ans << endl;

	return 0;
}