We have A apples and P pieces of apple.
We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.
Find the maximum number of apple pies we can make with what we have now.

-----Constraints-----
 - All values in input are integers.
 - 0 \leq A, P \leq 100

-----Input-----
Input is given from Standard Input in the following format:
A P

-----Output-----
Print the maximum number of apple pies we can make with what we have.

-----Sample Input-----
1 3

-----Sample Output-----
3

We can first make one apple pie by simmering two of the three pieces of apple. Then, we can make two more by simmering the remaining piece and three more pieces obtained by cutting the whole apple.

Difficulty: introductory

Starter code:

Solutions:
a,p = map(int,input().split())
A = a*3 + p
print(A//2)

#template
def inputlist(): return [int(j) for j in input().split()]
#template
A,P = inputlist()
print((3*A+P)//2)

A, P = map(int, input().split())
print((A*3+P)//2)

a,p = map(int,input().split())

m = a * 3 + p

if m % 2 == 0:
    print(m // 2)

else:
    print((m - 1) // 2)

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

A,P = map(int,input().split())
print((3*A+P)//2)

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

a, b = map(int,input().split())

n = a * 3 + b

print(int(n // 2))

a,p = map(int,input().split())

tip = p + a*3

print(tip//2)

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

A, P = map(int, input().split())
print((3 * A + P) // 2)

A, P = map(int,input().split())
Ap = 3*A+P
print(Ap//2)

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

A, P = list(map(int, input().split()))

ans = (A*3 + P)//2

print(ans)


def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    a, p = Input()
    x = a*3 + p
    ans = x//2
    print(ans)

main()

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

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

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

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


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

A,P=map(int, input().split())

print((A*3+P)//2)

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

import math

a, p = list(map(int, input().split()))

print((math.floor((3 * a + p) / 2)))


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

a, p = list(map(int, input().split()))

total_pie = (a * 3 + p) // 2
print(total_pie)


A, P = map(int, input().split())
print((3 * A + P) // 2)

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

A, P = map(int, input().split())

ans = (3*A + P)//2
print(ans)

a,p=map(int, input().split())

ans=(3*a+p)//2
print(ans)

A, P = map(int, input().split())

apple_fragment = A * 3 + P
apple_pie = apple_fragment // 2

print(apple_pie)

def solver():
    A, P = [int(n) for n in input().split()]
    return (A*3+P)//2

def __starting_point():
  print((solver()))

__starting_point()

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

A, P = map(int,input().split())

P = P + A*3

apple_pie = 0

while  P>1:
    
    apple_pie = apple_pie + 1
    P = P - 2
    
print(apple_pie)

A,P=map(int,input().split());print(A*3+P>>1)

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

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

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

A, P = map(int, input().split())

print((A * 3 + P) // 2)

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

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

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

A, P = input().split()


print((3*int(A) + int(P)) // 2)

A, P = map(int, input().split())

print((A*3+P) // 2)

A,P=map(int,input().split())
print((A*3+P)//2)

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

A,P = list(map(int,input().split()))

P = P + 3*A

print((P//2))


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

A, P = map(int, input().split())

ans = (3 * A + P) // 2
print(ans)

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

a,p = map(int,input().split())

p += a * 3
print(p // 2)

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

A,P = map(int,input().split())
print((3*A+P)//2)

a, p = map(int, input().split())

print((a * 3 + p) // 2)

A, P = map(int, input().split())
PP = 3*A + P
print(PP//2)

A, P = map(int, input().split())

print((A * 3 + P) // 2)

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

A,P=map(int,input().split())
print((3*A+P)//2)

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

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

A,P=map(int,input().split())
s=A*3+P
print(s//2)

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


A,P = map(int,input().split())
print((A*3 + P)//2)

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


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

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

a,p = list(map(int,input().split()))

print((int(3*a + p)//2))


a = input().rstrip().split(" ")
b = int(a[0])
c = int(a[1])
c = b*3 + c
print(int(c/2))

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

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

A,P = map(int,input().split())

P += A * 3

print(P // 2)

#ABC128 A

A,P = list(map(int,input().split()))
print(((3*A + P)//2))


hole_apple, piece_apple = map(int, input().split())

total_piece_apple = hole_apple * 3 + piece_apple
print(total_piece_apple // 2)

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

A,P=input().split()
ringo=int(A)*3
rin=ringo+int(P)
ri=rin//2
print(ri)

A, P = map(int, input().split())
print((3*A+P)//2)

A, P = map(int, input().split())
P += A * 3
ans = P // 2
print(ans)

a,p = map(int,input().split())

print((a*3+p)//2)

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


a, p = [int(x) for x in input().split()]
print(((a * 3 + p) // 2))


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

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

A,P=list(map(int,input().split(' ')))
if A==0:
    print((0))
    return
A=A*3
total=A+P

print((int(total//2)))


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


A,P=list(map(int,input().split()))
print(((3*A+P)//2))


a, p = map(int, input().split())

print((a * 3 + p) // 2)

A, P = map(int, input().split())
a = 3 * A + P
print(a // 2)


url = "https://atcoder.jp//contests/abc128/tasks/abc128_a"

def main():
    a,p = list(map(int, input().split()))
    p += a * 3
    print(p//2)

def __starting_point():
    main()
__starting_point()

# ABC128
# Apple Pie
a, p = list(map(int, input().split()))
p = (a * 3) + p
print(( p // 2))


a, p = list(map(int, input().split()))

print((a*3+p)//2)

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

a, p = list(map(int, input().split()))

print(((3*a+p)//2))


a = list(map(int,input().split()))
print(((a[0]*3+a[1])//2))


a,p=map(int,input().split())

b=a*3

print((b+p)//2)

A,P = map(int,input().split())

P += A*3

print(P//2)

A, P = list(map(int, input().split()))

print(((A * 3 + P) // 2))


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


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

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


A, P = map(int, input().split())
ans = (A*3+P)//2
print(ans)