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