# from math import factorial,sqrt
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# import scipy as scp

# 入力の受け取り
a,p = map(int,input().split())

chunk = 3*a +p
ans = chunk//2

print(ans)
# print("{:.10f}".format(ans))
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する
 a,p = map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split p chunk = 3*a +p chunk 3*a +p 3*a 3 a p ans = chunk//2 ans chunk//2 chunk 2 print(ans) print ans ans = chunk//2 chunk//2 ans a,p = map(int,input().split()) map(int,input().split()) a p = map(int,input().split()) map(int,input().split()) p chunk = 3*a +p 3*a +p chunk
# from math import factorial,sqrt
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# import scipy as scp

# 入力の受け取り
a,p = map(int,input().split())

chunk = 3*a +p
ans = chunk//2

print(ans)
# print("{:.10f}".format(ans))
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する

