n,m=map(int, input().split())
print((3*n+m)//2) n,m=map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m print((3*n+m)//2) print (3*n+m)//2 3*n+m 3*n 3 n m 2 n,m=map(int, input().split()) map(int, input().split()) n m=map(int, input().split()) map(int, input().split()) m
n,m=map(int, input().split())
print((3*n+m)//2)