#include <bits/stdc++.h>
int main(void) {
  int apple = 0;
  int app_div = 0;
  int applepies = 0;
  printf("please enter the number of apple : ");
  scanf("%d", &apple);
  printf("please enter the number of pieces of apple : ");
  scanf("%d", &app_div);
  applepies = (apple * 3 + app_div) / 2;
  printf("you can make %d apple pies at maximum", applepies);
}
