#include <bits/stdc++.h>
using namespace std;
void print(int arr[], int n) {
  for (int i = 0; i < n; i++) {
    cout << arr[i] << " ";
  }
  cout << endl;
}
int main() {
  int n, p;
  cin >> n >> p;
  int pieces = (n * 3) + p;
  cout << pieces / 2;
  return 0;
}
