#include <bits/stdc++.h>
using namespace std;
int a[100];
int main() {
  int a;
  int b;
  cin >> a >> b;
  int totalPieces = a * 3 + b;
  int pies = totalPieces / 2;
  if (pies % 2 == 0) {
    cout << pies;
  } else {
    cout << pies - 0.5;
  }
  return 0;
}
