import sys


input = sys.stdin.readline

A, P = map(int, input().split())
P += A*3
print(P//2) import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline A, P = map(int, input().split()) A map(int, input().split()) map int input().split() ().split () input split P P += A*3 P A*3 A 3 print(P//2) print P//2 P 2 P = map(int, input().split()) map(int, input().split()) P P += A*3 A*3 P input = sys.stdin.readline sys.stdin.readline input A, P = map(int, input().split()) map(int, input().split()) A
import sys


input = sys.stdin.readline

A, P = map(int, input().split())
P += A*3
print(P//2)