a,p = map(int, input().split())
print(int(((3*a+p)-(3*a+p)%2)/2)) a,p = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split p print(int(((3*a+p)-(3*a+p)%2)/2)) print int(((3*a+p)-(3*a+p)%2)/2) int ((3*a+p)-(3*a+p)%2)/2 (3*a+p)-(3*a+p)%2 3*a+p 3*a 3 a p (3*a+p)%2 3*a+p 3*a 3 a p 2 2 a,p = map(int, input().split()) map(int, input().split()) a p = map(int, input().split()) map(int, input().split()) p
a,p = map(int, input().split())
print(int(((3*a+p)-(3*a+p)%2)/2))