#include <bits/stdc++.h>
int main(void) {
  int a, b, x = 0, y, ans;
  scanf("%d %d", a, b);
  x = (a * 3) + b;
  y = x % 2;
  if (y == 1) {
    ans = (x - 1) / 2;
  } else {
    ans = x / 2;
  }
  printf("%d", ans);
  return 0;
}
