s = input().split()
a = int(s[0])
p = int(s[1])
all_p = a * 3 + p
apple_pie = int(all_p / 2)
print(apple_pie) s = input().split() s input().split() ().split () input split a = int(s[0]) a int(s[0]) int s[0] s 0 p = int(s[1]) p int(s[1]) int s[1] s 1 all_p = a * 3 + p all_p a * 3 + p a * 3 a 3 p apple_pie = int(all_p / 2) apple_pie int(all_p / 2) int all_p / 2 all_p 2 print(apple_pie) print apple_pie apple_pie = int(all_p / 2) int(all_p / 2) apple_pie p = int(s[1]) int(s[1]) p s = input().split() input().split() s a = int(s[0]) int(s[0]) a all_p = a * 3 + p a * 3 + p all_p
s = input().split()
a = int(s[0])
p = int(s[1])
all_p = a * 3 + p
apple_pie = int(all_p / 2)
print(apple_pie)