#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
const double EPS = 1e-8;
const int inf = 1 << 30;
int main() {
  long long a, b;
  if (a % 2 == 1) {
    cout << a / 2 * 6 << endl;
  } else {
    b = min(b, a - b);
    cout << (a / 2 + a / 2 - b) * 3 << endl;
  }
}
