a,b= input().split()
a= int(a)
b=int(b)
b= b + 3*a
c= b//2
print(c) a,b= input().split() a input().split() ().split () input split b a= int(a) a int(a) int a b=int(b) b int(b) int b b= b + 3*a b b + 3*a b 3*a 3 a c= b//2 c b//2 b 2 print(c) print c a= int(a) int(a) a b=int(b) int(b) b a,b= input().split() input().split() a b= input().split() input().split() b c= b//2 b//2 c b= b + 3*a b + 3*a b
a,b= input().split()
a= int(a)
b=int(b)
b= b + 3*a
c= b//2
print(c)