#include <bits/stdc++.h>
using namespace std;
int main() {
  int A;
  cin >> A;
  int p;
  p = A * 3;
  int P;
  cin >> P;
  int p1;
  p1 = p1 % 2;
  if (p1 != 0) {
    cout << ((P - p1) / 2) + p << endl;
  }
  if (p1 == 0) {
    cout << (P / 2) + p;
  }
}
