#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
ll gcd(ll m, ll n) {
  if (n == 0) return abs(m);
  return (gcd(n, m % n));
}
void putYN(bool b) {
  if (b) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
}
void swap(ll &a, ll &b) {
  ll tmp = a;
  a = b;
  b = tmp;
}
int main() {
  ll A, P;
  cin >> A >> P;
  ll ca = A * 3 + P;
  cout << ca / 2 << endl;
  return 0;
}
