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):
temp=list(map(int, input().split()))

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

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

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

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

Solution (Python):
A,P=(int(x) for x in input().split())
A_p=3*A
print((P+A_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):
A, P = [int(i) for i in input().split()]

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

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 os
import sys

A, P = map(lambda x: int(x), 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())
sum = 3 * A + P
print(sum // 2)

Solution (Python):
a,p = map(int,raw_input().split())
pie = p/2
pie_amari = p%2
kakera = a*3
pie_2 = (kakera + pie_amari)/2
print(pie + pie_2)

Solution (Python):

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

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

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

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

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

Solution (Python):

import sys


def solve(A: int, P: int):
    print((A * 3 + P) // 2)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    P = int(next(tokens))  
    solve(A, P)

if __name__ == '__main__':
    main()

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

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


if __name__ == "__main__":
    main()

Solution (Python):
A, P = map(int, input().split())
if (3*A + P) % 2== 0:
    print(int((3*A + P) /2))
else:
    print(int((3*A + P-1)/2))

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

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

Solution (Python):
apple, piece = map(int, input().split())

piece += apple * 3

pi = piece // 2

print( pi )

Solution (Python):
count, piece = map(int, input().split())

print(int((count * 3 + piece) / 2))

Solution (Python):


a, p = [int(x) for x in 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())
print(int((3*A+P)/2))

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

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

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

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

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

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

Solution (Python):
A, P = map(int, input().split())
P = P + 3*A
print(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,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):
ap = list(map(int, input().split()))
a = ap[0]
p = ap[1]

parts = 3 * a + p

if parts % 2 ==0:
    pie = parts / 2
else:
    pie = (parts - 1) / 2
    
print(int(pie))

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):
x,y = map(int,input().split())
print(int((x*3+y)/2))

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

main()

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

Solution (Python):
a, p = [int(_) for _ 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,b=map(int,input().split());print((3*a+b)//2)

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

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

Solution (Python):
import math

if __name__ == "__main__":

    line = input()
    (A, P) = [int(x) for x in line.split(" ")]
    fragments = A * 3 + P
    print(math.floor(fragments/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())

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

print(ans)

Solution (Python):
i = input().split(" ")
a = int(i[0])
p = int(i[1])
piece = a*3 + p
pie = int(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):

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

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

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

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

Solution (Python):
a = list(map(int, input().split()))
ans = a[0] * 3 + a[1]
print(int(ans / 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, 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):
class Applemanager:
    def __init__(self, A, P):
        self.Apple       = A
        self.broken_Apple = P
        self.Apple_pi     = 0

    def make_apple_pi(self):
        self.Apple_pi = int(self.broken_Apple / 2)

    def make_broken_Apple(self):
        self.broken_Apple = self.broken_Apple + self.Apple * 3


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

A = S[0]
P = S[1]

Applmngr = Applemanager(A, P)

Applmngr.make_broken_Apple()
Applmngr.make_apple_pi()

print(Applmngr.Apple_pi)

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

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

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

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

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

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

total_P = 3*A + P

pies = total_P // 2

print(pies)

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 = (A * 3 + P) // 2
print(ans)

Solution (Python):
a,b=map(int,input().split())
print((3*a+b)//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())

x=3*A+P

print(x//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 = 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((3*a + p) // 2)

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

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

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

print(pies)

Solution (Python):
A, P =map(int,input().split())
N = A*3 + P
print(int(N/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 = list(map(int, input().split()))

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

Solution (Python):
A, P = map(int, input().split())
 
Apple = 3*A + P
 
if Apple % 2 == 0:
  ans = Apple/2
else:
  ans = (Apple-1)/2
 
print(int(ans))

Solution (Python):
a, p = list(map(int, input().split()))
piece = 3 * a + p
print(piece // 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 = list(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(x) for x in 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())
print(int(0.5*(3*a + p)))

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

Solution (Python):
a, p =map(int, input().split())
p += a* 3
print(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((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)

print(p//2)

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

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

Solution (Python):
from sys import stdin

a, p = stdin.readline().rstrip().split()

a = int(a)
p = int(p)

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

print(pie)

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

Solution (Python):
A, P = (int(a) for a in input().split())

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

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

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

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

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

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

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

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):
a, p = list(map(int,input().split()))
print(int(((3 * a) + p)/2))

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 = list(map(int,input().split()))

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

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((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())
p += a*3
print(p//2)

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

Solution (Python):
import sys
input = sys.stdin.readline

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

if __name__ == '__main__':
	main()

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

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):
import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [A, P] = string_to_int(inputs[0])
    pieces = A*3 + P
    return pieces//2


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

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 = (int(x) for x in input().split())
print((3*A + P) // 2)

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

Solution (Python):
import sys
from collections import deque  
from collections import defaultdict  
from heapq import heapify, heappush, heappop, heappushpop  
from bisect import bisect_left, bisect_right  



s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in ss]
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2sss = lambda n: [list(sys.stdin.readline().rstrip()) for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))
MOD = int(1e+9) + 7

def main():
    A, P = i2nn()
    print((3 * A + P) // 2)

main()

Solution (Python):


import sys
import copy

sys.setrecursionlimit(1000000)





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

P += A * 3

print(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,b = map(int, input().split())

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

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

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

Solution (Python):
a,p=map(int,input().split())
print(int(a*3/2+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())

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 = map(int,input().split()) 
apple_pye = (3*A+P)/2
print(int(apple_pye))

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

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

Solution (Python):
import math
l = list(map(int, input().split()))
kakera = l[0] * 3 + l[1]
pi = math.floor(kakera / 2)
print(pi)

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

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

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

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

total = a * 3 + p

print(int(total / 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 = 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((A * 3 + P) // 2)

Solution (Python):
A,P = [int(_) for _ 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())
X = (3 * A + P)//2
print(X)

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=(A*3+P)//2
print(ans)

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

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

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 = [int(x) for x in input().split()]

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

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

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())
print((a*3+p)//2)

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

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

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

num = (x * 3 + y) // 2
print(num)

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

Solution (Python):
a = [int(x) for x in input().split(" ")]
b = a[0]*3+a[1]
c = int(b/2)
print(c)

Solution (Python):
a = [int(x) for x in input().split(" ")]
b = a[0]*3+a[1]
c = int(b/2)
print(c)

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

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

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

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

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):
A,P=map(int,input().split())
print("{}".format((3*A+P)//2))

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

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

Solution (Python):



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


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


print(int(ans))

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

Solution (Python):
def main():
    a , p =  map(int,input().split())
    apple_count = a * 3
    apple_count = apple_count + p

    ans = apple_count / 2
    print(int(ans))

if __name__ == '__main__':
    main()

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

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

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


main()

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())

P = P + 3 * A
pies = P / 2

print(int(pies))

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

Solution (Python):
A,P=map(int,input().split())
tot=3*A+P
print(tot//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())
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())
print(int(math.floor((3*A + P)/2)))

Solution (Python):
a, p = map(int, raw_input().split())
p += 3*a
print 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((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())

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

print(ans)

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

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

print((a_split + 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):
def main():
    A, P = list(map(int, input().split()))

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

if __name__ == '__main__':
    main()

Solution (Python):

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

Solution (Python):

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

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

print(ans)

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((A * 3 + P) // 2)

Solution (Python):
a,p = input().split()
ap = 3*int(a)

print(int((ap+int(p))/2))

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

main()

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

Solution (Python):

import bisect
from collections import defaultdict

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

if __name__ == '__main__':
    main()

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


main()

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

Solution (Python):
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b



def sum_of_arithmetic_progression(s, d, n):
    return n * (2 * s + (n - 1) * d) // 2



def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)



def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


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


if __name__ == '__main__':
    main()

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

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

Solution (Python):

import math
a,p=list(map(int, input().split()))
p+=a*3
print(math.floor(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())
X = 3*A + P
print(int(X/2))

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

Solution (Python):
from sys import stdin

A,P = map(int,stdin.readline().rstrip().split())
piece = 3 *A + P
print(int(piece/2))

Solution (Python):
a, b = map(int, raw_input().split())
r = a * 3
c = r + b
x = c / 2
if a == 0:
    print "0"
else:
    print x

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

Solution (Python):
a,p = map(int,input().split())
z = a*3+p
if z % 2 == 0:
  print(int(z/2))
else:
  print(int((z-1)/2))

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

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

print(num_apple_pies)

Solution (Python):
def solve(string):
    a, p = map(int, string.split())
    return str((a * 3 + p) // 2)


if __name__ == '__main__':
    print(solve(input()))

Solution (Python):
A, P = list(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())
pp = 3*A + P
print(pp//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):
i = list(map(int,input().split()))
A=i[0]
P=i[1]
S=(A*3+P)//2
print(S)

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

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

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

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

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

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

Solution (Python):
a, p = list(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):
s = list(map(int, input().strip().split(' ')))

apple = 3 * s[0] + s[1]
ans = apple // 2

print(ans)

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 = list(map(int, input().split()))

PP = 3*a + p

print(PP//2)

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

p = 3*a + p

pi = p // 2

print(pi)

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

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

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

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

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

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

print(R)

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

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

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

Solution (Python):
(A,P) = list(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((3 * a + p) // 2)

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

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

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

print(pie)

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

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

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

p+=a*3

app=p//2
print(app)

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

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

Solution (Python):
ap=[int(x) for x in input().split(' ')]
pie=(ap[0]*3+ap[1])//2
print(pie)

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

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

Solution (Python):
a, p = list(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, raw_input().split())

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

Solution (Python):
import sys

input = sys.stdin.readline
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):
import math

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

print(math.floor((3*a+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())

apple_pie = math.floor( (A*3 + p) / 2)
print(apple_pie)

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

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

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

print(ans)

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 =(int(x) for x in input().split())
answer = int((A*3+P)/2)
print(answer)

Solution (Python):

def cin():
    return map(int, input().split())


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

Solution (Python):

def cin():
    return map(int, input().split())


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

Solution (Python):


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

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

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

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

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

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

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

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

print((3*a+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((3*a+p)//2)

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

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

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

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

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

print(result)

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=list(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(int((a*3+p)/2))

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

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



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

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



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

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

Solution (Python):
def main():

    apple, apple_piece = (int(val) for val in input().split())

    apple_piece += apple * 3
    apple_pie = int(apple_piece / 2)

    print(apple_pie)

if __name__ == '__main__':

    main()

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())
print(int((3*A+P)/2))

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

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

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((3 * A + P) // 2)