#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define ALL(v) (v).begin(), (v).end()

using namespace std;
using ll = long long;

int main(
{
  int a, p; cin >> a >> p;
  cout << (3*a+p)/2 << endl;
}
