#include <bits/stdc++.h>
int main() {
  int a, p, n, N = 0;
  scanf("%d %d", &a, &p);
  n = 3 * a + p;
  if (n % 2 == 0) {
    N = n / 2;
  } else {
    N = (n - 1) / 2;
  }
  printf("%d\n", &N);
  return 0;
}
