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