Problem:
 Score : 100 points    Problem Statement 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 1 3      Sample Output 1 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.       Sample Input 2 0 1      Sample Output 2 0  We cannot make an apple pie in this case, unfortunately.       Sample Input 3 32 21      Sample Output 3 58

Solution (Python):
import sys

from fractions import gcd





from itertools import accumulate













input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def li(): return list(input().rstrip())



def iterate_tokens():
    for line in sys.stdin:
        for word in line.split():
            yield word


if __name__ == '__main__':

    tokens = iterate_tokens()
    A = int(next(tokens))  
    P = int(next(tokens))  

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

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

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

Solution (Python):


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

Solution (Python):

import math


def main():
    inp = input().split()
    a = int(inp[0])
    p = int(inp[1])
    return math.floor((a * 3 + p) / 2)


if __name__ == '__main__':
    print(main())

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

Solution (Python):


s = input().split()
A = int(s[0])
P = int(s[1])

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

Solution (Python):
a,p = map(int, input().split())

p_all = a*3 + p
max_pi = p_all // 2

print(max_pi)

Solution (Python):

a, p = [int(e) for e in input().split()]
pieces = a*3 + p

print(int(pieces/2))

Solution (Python):
A,P=(int(i) for i in input().split())
print((P+3*A)//2)

Solution (Python):
a, p = map(int, input().split())

s = 3*a + p
pies = s // 2

print(pies)

Solution (Python):
import math
a,p = list(map(int,input().split()))

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

Solution (Python):
A, P = map(int, input().split())

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

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

Solution (Python):
A, P = map(int, input().split())
A_pi = 1.5 * A
P_pi = P / 2.0
pi = int(A_pi + P_pi)
print(pi)

Solution (Python):


"""
Created on Sun Jun  9 13:38:41 2019

@author: YudNK
"""

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

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

Solution (Python):
A,P = map(int,input().split())
 
N = A*3+P
M = int(N/2)
 
print(M)

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

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

Solution (Python):
A, P = map(int, input().strip().split(' '))

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

Solution (Python):
i = map(int, raw_input().split())
print(int((i[0]*3+i[1]))/2)

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

Solution (Python):


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

Solution (Python):
A,P =map(int, input().split())

pie=0
kakera=0

kakera=3*A+P
pie = kakera/2
print(int(pie))

Solution (Python):

import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():

    'ss'
    a, p = f()
    print((a*3 +p)//2)

solve()

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

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

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

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

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

Solution (Python):
A, P = map(int, input().split())

A = A*3
apple_kakera = A+P
ans = apple_kakera // 2

print(ans)

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

Solution (Python):
apple, frag = map(int, input().split())
         
pie = ((apple*3) + frag) / 2
         
print(int(pie))

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

Solution (Python):
A, P = input().split()
total = int(A) * 3 + int(P)
print(total // 2)

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

Solution (Python):
apple, piece = map(int, input().split())
print((apple*3+piece)//2)

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

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

Solution (Python):
a, p = (int(e) for e in input().split())

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

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

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

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

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

Solution (Python):



a = input()
b = a.split()
c,d =b
A=int(c)
P = int(d)

e = 3*A+P

answer = e//2

print(answer)

Solution (Python):
i=list(map(int,input().split()))
apple=i[0]*3/2+i[1]/2
print(int(apple))

Solution (Python):
import math
apple_one, apple_kakera = (int(i) for i in input().split())  
apple_kakera += apple_one * 3
print(math.floor(apple_kakera / 2) )

Solution (Python):
import math


def main(x,y):
    P = 3*x+y
    num = math.floor(P/2)
    print(num)


    
x, y = map(int,input().split())
main(x,y)

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

Solution (Python):
N = input()
N = N.split()
A = int(N[0])
P = int(N[1])
W = 0

W = A*3 + P
pie = int(W / 2)
print(pie)

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

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

Solution (Python):
from sys import stdin

A, B= [int(x) for x in stdin.readline().rstrip().split()]
C = (A*3+B)//2
print(C)

Solution (Python):



a_p = input()

a = a_p.split(" ")[0]
p = a_p.split(" ")[1]

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

Solution (Python):
a, p = map(int, input().split())
c = int((3*a+p) / 2)
print("{}".format(c))

Solution (Python):
import math

a,p = (int(i) for i in input().split(" "))

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

Solution (Python):
A, P = [int(x) for x in input().split()]
print(P//2 + (P%2+A*3)//2)

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

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

Solution (Python):
A,P = map(int, input().split())

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

print(ans)

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

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

Solution (Python):
A, P = map(int,input().split())

total = A*3 + P

print(total//2)

Solution (Python):
str = input().split()

a = int(str[0])
p = int(str[1])

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

Solution (Python):

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

Solution (Python):

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


if a == 0:
 print(p // 2)

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

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

Solution (Python):
a, p = map(int, input().split())
thing = (a*3)+p
things = (thing//2)
print(things)

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

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

Solution (Python):
a,p = input().split()
A = int(a)
P = int(p)
total_p = A * 3 + P
print(int(total_p / 2))

Solution (Python):
a, b = map(int, input().split())
c = (3 * a + b) / 2

print(int(c))

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

Solution (Python):
A,P = input().split()
p = 3*int(A) + int(P)
pi_num = p//2
print(pi_num)

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

Solution (Python):
a,p = map(int,input().split())

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

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

Solution (Python):

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

Solution (Python):
a, p = map(int, input().split())

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

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

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

Solution (Python):
A , P = (int(i) for i in input().split())
ans = (3*A+P)//2
print(ans)

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

Solution (Python):
import math
a, p = map(int, input().split())
cnt = math.floor((3*a+p)/2)
print(cnt)

Solution (Python):
A, P = map(int, input().split())

pieces = A * 3 + P

apple_pie = pieces // 2

print(apple_pie)

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

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

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

Solution (Python):

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

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

Solution (Python):

"""
Created on Wed Jun  5 09:53:48 2019

@author: Enya
"""

input_code = input()
A = int(input_code.split()[0])
P = int(input_code.split()[1])

X = A*3 + P

print(X//2)

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

Solution (Python):
A, P = map(int, input().split())

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

Solution (Python):
print(sum([v*3**(1-i)for i,v in enumerate(map(int,input().split()))])//2)

Solution (Python):
import math
from sys import stdin, stdout

readline = stdin.readline
write = stdout.write
a, p = map(int, readline().split())
write('{}\n'.format(math.floor(((a * 3) + p) / 2)))

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

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

ap_piece = A*3+P

max_pi = ap_piece//2

print(max_pi)

Solution (Python):
A,P=[int(i) for i in input().split()]
print((A*3+P)//2)

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

Solution (Python):
A, P = map(int, input().split())

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

Solution (Python):


if __name__ == '__main__':
    a, p = list(map(int, input().split()))
    p += (a * 3)
    print(p // 2)

Solution (Python):
import sys
input = sys.stdin.readline
a,p = map(int,input().split())
print((a*3+p)//2)

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

Solution (Python):
a, p = list(map(lambda x: int(x), input().split()))
pi = (a * 3 + p) // 2
print(pi)

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

Solution (Python):
A, P = map(int, raw_input().split())
print (3 * A + P) / 2

Solution (Python):
import sys
input = sys.stdin.readline
ri = lambda: int(input())
rl = lambda: list(map(int,input().split()))
rr = lambda N: [ri() for _ in range(N)]
YN = lambda b: print('YES') if b else print('NO')
yn = lambda b: print('Yes') if b else print('No')
OE = lambda x: print('Odd') if x%2 else print('Even')
INF = 10**18
MOD=10**9+7

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

Solution (Python):
c=list(map(int, input().split()))
s=(3*c[0]+c[1])//2
print(s)

Solution (Python):
c=list(map(int, input().split()))
s=(3*c[0]+c[1])//2
print(s)

Solution (Python):
A, P = map(int, input().split())

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

Solution (Python):
A, P = (int(x) for x in input().split())
print((3*A+P)//2)

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

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

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

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

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

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

Solution (Python):
A,P=map(int,input().split())

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

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

Solution (Python):
A,P=map(int,input().split())

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

Solution (Python):

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

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

Solution (Python):
a,p = (int(x) for x in input().split())

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

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

Solution (Python):

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

Solution (Python):
A, P = [int(x) for x in input().split()]
print(int(((A * 3 + P) / 2)))

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

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

Solution (Python):
import sys

for l in sys.stdin:
  a, p = l.rstrip('\n').split(' ')
pies = (int(a) * 3 + int(p)) //2
print(pies)

Solution (Python):
x,y = map(int,input().split())	

z=3*x+y
a=(z-z%2)/2

print(int(a))

Solution (Python):
import math
A, P = map(int, input().split())
P += A * 3
s = math.floor(P / 2)
print(s)

Solution (Python):
A, P = map(int, input().split())

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

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

Solution (Python):
apple, peace = map(int, input().split())
print((apple * 3 + peace) // 2)

Solution (Python):
data=input().split()
sum=int(data[0])*3+int(data[1])
print(sum//2)

Solution (Python):
a, p = map(int, input().split())
piece = p + a*3
pie = piece//2
print(pie)

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

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

Solution (Python):

def pie():
    a, b = raw_input().split(' ')
    pie = (int(a)*3 + int(b))/2
    return pie

print(pie())

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

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

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

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

Solution (Python):
argv = [int(i) for i in input().split()]

A = argv[0]
P = argv[1]
AP = A * 3

print(int((P + AP )/2))

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

Solution (Python):
import sys

def main():
    input = [int(n) for n in sys.stdin.readline().split()]

    pieces = input[0] * 3 + input[1]

    print(pieces // 2)

if __name__ == "__main__":
    main()

Solution (Python):
A, P = map(int, input().split())

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

Solution (Python):
import math
input_data = input().split(' ')
input_data_int = [int(x) for x in input_data]
A = input_data_int[0]
P = input_data_int[1]
apple_pices = A * 3 + P

print(math.floor(apple_pices/2))

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

Solution (Python):
nums = [int(e) for e in input().split()]

a = nums[0]
p = nums[1]

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

print(int(ans))

Solution (Python):
a,p = map(int,input().split(" "))
t = a * 3 + p
print(t // 2)

Solution (Python):
a,p=map(int, input().split())

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

Solution (Python):


import numpy as np



In = list(map(int, input().split()))

A = In[0]
P = In[1]

piece = 3*A + P
pie = int(piece/2)

print(pie)

Solution (Python):
a, p = map(int, input().split())

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

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

Solution (Python):
A, P = map(int, input().split())

fragment = 3 * A + P

print(fragment // 2)

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

Solution (Python):
z=list(map(int,input().split()))
a=z[0]
p=z[1]
cut=a*3+p
rest=cut%2
pie=int((cut-rest)/2)
print(pie)

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

Solution (Python):
A, P = map(int, input().split())

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

Solution (Python):
A,P = map(int, input().split())

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

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

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

Solution (Python):
n=input().split(" ")
A=int(n[0])
P=int(n[1])

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

Solution (Python):
A, P = [int(i) for i in input().split()]
print((A * 3 + P) // 2)

Solution (Python):

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

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

Solution (Python):
A,P = map(int, input().split())

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

print(result)

Solution (Python):




def main():
    
    a, p = [int(s) for s in input().split()]
    
    p += a*3
    ans = p//2
    
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
A, P = map(int, input().split())
p = 0
if A >= 1:
      p += A * 3  

p += P
print(p // 2)

Solution (Python):
import math

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

print(math.floor((A * 3 + P) / 2))

Solution (Python):
a,p=map(int,input().split())

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

Solution (Python):
A, P = [int(x) for x in input().split()]
print((3*A+P)//2)

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

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

Solution (Python):
A, P = (int(s) for s in input().split())
p = 3 * A + P
print(p // 2)

Solution (Python):
a,b=map(int,input().split())
piece = a * 3 + b
pie = piece / 2
print(int(pie))

Solution (Python):

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

pieces = P + (A * 3)

print(pieces // 2)

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

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

Solution (Python):
def main():
    A ,P = map(int,input().split())
    print((A*3+P)//2) 

main()

Solution (Python):
a,p = map(int, input().split())
kakera = 0
pie = 0
kakera = a * 3 + p
pie = kakera / 2
print(int(pie))

Solution (Python):
import math
A, P = map(int, input().split())
print(math.floor((A * 3 + P) / 2))

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

Solution (Python):
from sys import stdin
arg = stdin.readline().rstrip().split()
a = int(arg[0])
p = int(arg[1])
a1 = a*3
print (int((a1+p)/2))

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

Solution (Python):
a, b = [int(i) for i in input().split()]

b += 3 * a

print(b // 2)

Solution (Python):

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

Solution (Python):
import sys

a, p = map(int, sys.stdin.readlines()[0].strip().split())
print((p + a * 3) // 2)

Solution (Python):
A, P = map(int, input().split())

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

Solution (Python):


[A, P] = [int(i) for i in input().split()]

piece_number = A * 3 + P

pie_number = piece_number // 2

print(pie_number)

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

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

Solution (Python):
a,p=map(int,input().split())

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

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

Solution (Python):
a, p = [int(val) for val in input().split()]

piece = 3 * a + p
pie = piece // 2

print(pie)

Solution (Python):
a,b=map(int,input().split())
d=0
c=a*3
if c>=1:
    d=(c+b)//2
elif c==0 and b>1:
    d=b//2
print(int(d))

Solution (Python):
new_str = input()
new_list = new_str.split(" ")
a = int(new_list[0])
b = int(new_list[1])
sum = a*3+b
sum = int(sum/2)
print(sum)

Solution (Python):

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

if __name__ == '__main__':
    main()

Solution (Python):
a,p=map(int,input().split())

p=3*a+p

ap=int(p/2)

print(ap)

Solution (Python):
A, P = map(int,input().split())

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

Solution (Python):
A, P = map(float, input().split())

ans = (A * 3 + P)/2

print (int(ans))

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

Solution (Python):
import sys
def input():
  return sys.stdin.readline()

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

Solution (Python):
import sys
def input():
  return sys.stdin.readline()

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

Solution (Python):
a, p = map(int, input().split())


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

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

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

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

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

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

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

Solution (Python):
import math

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

apple = 3 * a + p

ans = (math.floor(apple / 2))

print(ans)

Solution (Python):
A, P = map(int, input().split())

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

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

Solution (Python):
str = input().split()
A = int(str[0])
P = int(str[1])

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

Solution (Python):
def method1():
    nums = list(map(int, input().split()))
    result = int((nums[0]*3 + nums[1])/2)
    print(result)



if __name__ == "__main__":
    method1()

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

Solution (Python):
def solve(a, p):
    return (a * 3 + p) // 2

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

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

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

Solution (Python):
a, p = map(int, input().split())

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

Solution (Python):
A, P = [int(x) for x in input().split(' ')]
S = A * 3 + P
R = S // 2
print(R)

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

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

A, P = nl()
print((A*3+P)//2)

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

A, P = nl()
print((A*3+P)//2)

Solution (Python):

nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

A, P = nl()
print((A*3+P)//2)

Solution (Python):
a, p = input().split()
a = int(a)
p = int(p)
pieces = a * 3
sum = p + pieces
print(sum//2)

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

Solution (Python):
import sys

a, p = map(int,sys.stdin.readline().rstrip().split())

print (a * 3 + p) // 2

Solution (Python):
a, p = [int(elem) for elem in input().split()]

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

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

Solution (Python):

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

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

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

Solution (Python):

"""
Created on Thu May 30 17:13:37 2019

@author: またの
"""

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

N = A*3+P
ans = N//2

print(ans)

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

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    a, p = f()
    print((a*3 +p)//2)

solve()

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

Solution (Python):
if __name__ == '__main__':
    _input = input().split()

    pie = int((int(_input[0]) * 3 + int(_input[1]))/2)
    print(pie)

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
A, B = map(int, input().split())

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

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    a, p = LI()
    print((a*3+p)//2)
    return


def B():
    return


def C():
    return


def D():
    return


def E():
    return


def F():
    return


def G():
    return


def H():
    return


if __name__ == '__main__':
    A()

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

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

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

Solution (Python):



import sys

input = sys.stdin.readline

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

main()

Solution (Python):
A,P=map(int,input().split())



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

Solution (Python):
a,p = map(int, input().split())

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

Solution (Python):

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

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

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

Solution (Python):

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

Solution (Python):

d=[int(i) for i in input().split()]
print(int((d[0]*3+d[1])/2))

Solution (Python):
A, P = map(int, input().split())

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

print(res)

Solution (Python):
A,P=map(int,input().rstrip().split(' '))

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

print(ans)

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

Solution (Python):
import math
def resolve():
    (a, p) = list(map(int, input().split(" ")))
    print(math.floor((3*a + p)/2))
    
if '__main__' == __name__:
    resolve()

Solution (Python):
a, p = map(int, input().split())

re = int((a*3 + p) / 2)

print(re)

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

Solution (Python):
nums = list(map(int, input().split()))

ans = 0

ans = (nums[0]*3 + nums[1])/2

print(int(ans))

Solution (Python):
a,p = map(int,input().split())

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

Solution (Python):
import math
inp = input().split(" ")
a = int(inp[0])
p = int(inp[1])

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

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

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

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

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

Solution (Python):
a=list(map(int,input().split()))

print((a[0]*3+a[1])//2)

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

Solution (Python):
A, P = map(int, input().split())

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

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

Solution (Python):
A, P = (int(x) for x in input().split())
pie = ((A * 3) + P) // 2
print(pie)

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

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

Solution (Python):
A,P=(int(i) for i in input().split())
print(int((3*A+P)/2))

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

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

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

Solution (Python):
inp = input()
lis = inp.split()
ap = int(lis[0])
a = int(lis[1])
if (ap*3+a < 2):
    print(0)
else:
    print((ap*3+a)//2)

Solution (Python):
a,p=map(int,input().split())
c=a*3
b=(c+p)//2
print(b)

Solution (Python):
a, p = map(int, input().split())

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

Solution (Python):
def main():
	A, P = map(int, input().split())
	print((3*A+P)//2)


if __name__ == '__main__':
	main()

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

Solution (Python):

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

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

Solution (Python):
a, p = map(int, input().split())

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

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

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

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

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

Solution (Python):
A,P = map(int,input().split())
ans = 0

A = int(A)
P = int(P)

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

print(ans)

Solution (Python):
A, P = [int(_) for _ in input().split()]

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

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

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

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

Solution (Python):
import math
[A, P] = map(int, input().split())
sum = 3 * A + P
print(math.floor((sum - sum % 2) / 2))

Solution (Python):
A,P= map(int, input().split())
G=0
G=(3*A+P)//2
print(G)

Solution (Python):
A, P = map(int, input().split())

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

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

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

Solution (Python):
A, P = map(int, input().split())

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

print(ans)

Solution (Python):
A, P = map(int, input().split())
kakera = 3*A + P
pie = kakera // 2
print(pie)

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

Solution (Python):
n,p=map(int,input().split())
print((p//2)+((p%2)+3*n)//2)

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

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

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

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

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

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

Solution (Python):
A, P = map(int, input().split())

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

Solution (Python):
apple = [int(i) for i in input().split()]
print((apple[0] * 3 + apple[1]) // 2)