#include <bits/stdc++.h>
using namespace std;
const long long INF = 1LL << 58;
const long long MOD = 1000000007;
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
signed main() {
  long long A, P;
  cin >> A >> P;
  cout << (A + P * 3) / 2 << endl;
}
