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):
"""
author : halo2halo
date : 12, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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

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

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

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

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

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

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

parts = 3 * A + P

if parts % 2 == 0:
    print(round(parts / 2))
else:
    print(round((parts - 1) / 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((p+3*a)//2)

Solution (Python):
x = input()
x_list = x.split(" ")
a = int(x_list[0])
p = int(x_list[1])

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

Solution (Python):
def examA():
    A, P = LI()
    ans = (A*3+P)//2
    print(ans)
    return

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
alphabet = [chr(ord('a') + i) for i in range(26)]

if __name__ == '__main__':
    examA()

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

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

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

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

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

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

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

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

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


if __name__ == '__main__':
    main()

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

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())
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):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,p=INTM()
    print((3*a+p)//2)
if __name__ == '__main__':
    do()

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

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

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

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

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

a = a*3 + p

pie = a//2

print(pie)

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

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

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

Solution (Python):
a, b = [int(i) for i in 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, P = map(int, input().split())
P = P + A*3

print(int(P/2))

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

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

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

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

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

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

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

total = a * 3 + p

print(total//2)

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

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

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

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

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

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())
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(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):
import math

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

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

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

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

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

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

if (3*a+p)%2 == 0:
    print((3*a+p)//2)
else:
    print((3*a+p-1)//2)

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

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

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

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

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

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

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


if __name__ == '__main__':
    solve()

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

print(ans)

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

count = (b+3*a)//2

print(count)

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

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

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

print(ans)

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

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

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

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

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

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

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

answer = A * 3 + P

print(answer // 2)

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

a,p = inpl()
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(int((A*3+P)/2))

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

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

print(ans)

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

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

if x[0] < 1 and x[1] < 2:
    print(0)
else:
    print(((x[0] * 3) + x[1]) // 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())

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

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

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

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

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

sum_keppen = x*3 +y

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

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

a_parts = (3 * A) + P
ap = a_parts // 2 if a_parts // 2 else 0

print(ap)

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

Solution (Python):



def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def main():
    a, p = rli()
    print((a*3+p)//2)


if __name__ == '__main__':
    main()

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

Solution (Python):
n, k = [int(x) for x in input().split()]

print(str((n*3+k)//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())

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

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

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

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

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

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

if a == 0 and p == 0:
  ans = 0
else:
  ans = (a * 3 + p) // 2

print(ans)

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

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

Solution (Python):


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

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

Solution (Python):



import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

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

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

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

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

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

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

x = a * 3
y = (x + p) // 2

print(y)

Solution (Python):

import math
import datetime





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

Solution (Python):
A,P=tuple(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())
M = A*3 + P
print(M//2)

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

N_piec = A * 3  + P
N_pie  = N_piec / 2
print N_pie

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline
def print_ans(A, P):
    """Test Case
    >>> print_ans(1, 3)
    3
    >>> print_ans(0, 1)
    0
    >>> print_ans(32, 21)
    58
    """
    print((A * 3 + P) // 2)

if __name__ == '__main__':
    A, P= map(int, input().rstrip().split())
    print_ans(A, P)

Solution (Python):
from collections import defaultdict,deque, Counter
import sys,heapq,bisect,math,itertools,string,queue,copy,time
import numpy as np
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
ans = 1

[A,P] = inpl()
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())

Ringonokakera = (P+(A*3))

print(Ringonokakera//2)

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

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

Solution (Python):
arguments = input()
arguments_as_list = arguments.split(" ")
list_to_integer = list(map(int, arguments_as_list))
apples_pieces = list_to_integer[0]*3
pieces = list_to_integer[1]


print(int((apples_pieces + pieces)//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())

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

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

Solution (Python):
import sys

a, p = sys.stdin.readline().rstrip().split()
a = int(a)
p = int(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((A*3+P)//2)

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

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

Solution (Python):
import unittest


class TestA(unittest.TestCase):
    def test_1(self):
        self.assertEqual(think(1, 3), 3)

    def test_2(self):
        self.assertEqual(think(0, 1), 0)

    def test_3(self):
        self.assertEqual(think(32, 21), 58)


def solve():
    a, p = read()
    result = think(a, p)
    write(result)


def read():
    return read_int(2)


def read_int(n):
    return read_type(int, n)


def read_float(n):
    return read_type(float, n)


def read_type(t, n):
    return list(map(lambda x: t(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(a, p):
    return (a * 3 + p) // 2


def write(result):
    print(result)


if __name__ == '__main__':
    
    solve()

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

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

Solution (Python):

import sys










def main():
    a, p = [int(x) for x in sys.stdin.readline().split()]
    pieces = a * 3 + p
    pies = pieces // 2
    print(pies)

if __name__ == "__main__":
    main()

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

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**9)
def input():
    return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Solution (Python):

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

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

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

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

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

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

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

sum = (apple*3)+piece

ans = sum//2

print(ans)

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

P = P+A*3

print(P//2)

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

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

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

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

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

Solution (Python):
import math

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

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

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

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

Solution (Python):
tmp = list(map(int, input().split()))
a = tmp[0]
p = tmp[1]

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

Solution (Python):



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

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

Solution (Python):

import sys
def input():
    return sys.stdin.readline().rstrip()

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

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

Solution (Python):

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

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

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

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

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

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

pie = ( A*3 + P ) / 2 

import math

print(math.floor(pie))

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

Solution (Python):
A, P = list(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())
ap = 0

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

print(ap)

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

b = a*3 + p

c = int(b/2)

print(c)

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

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

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

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


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

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

Solution (Python):

import sys
sys.setrecursionlimit(10000)
INF = 1<<32


def solve(A: int, P: int):
    print((3*A+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):
import math

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

print(num)

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

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

Solution (Python):

import sys


def solve(A: int, P: int):
    piece = A * 3 + P
    print(piece // 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())
total = 3*a+b
available=total/2
print(int(available))

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

import math
def main():
    A,P = map(int, input().split())
    pieces = A*3 + P
    if pieces < 3:
        print(0)
        return
    apple_pie = math.floor(pieces/2)
    print(apple_pie)

if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
A, P = map(int, input().split())
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())
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):
def main():
    a,p = [int(x) for x in input().split()]

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


if __name__ == '__main__':
    main()

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

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

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

print(ans)

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

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

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

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

Solution (Python):
N = input().split()
apple = int(N[0])
pie = int(N[1])
peace = 3 * apple + pie
all = peace // 2
print(all)

Solution (Python):
def apple():
    inStr = input().split()
    a = int(inStr[0])
    p = int(inStr[1])
    ans = (a * 3 + p) / 2
    print(int(ans))


def dance_beta():
    s = input()

    odd_keep = []
    even_keep = []

    for i in range(len(s)):
        if ((i + 1) % 2 == 1):  
            odd_keep.append(s[i])
        else:                   
            even_keep.append(s[i])

    if ("R" in odd_keep and "L" in even_keep):
        print("Yes")
    else:
        print("No")


apple()

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

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

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

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

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

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

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

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    a, p = list(map(int, input().rstrip('\n').split()))
    print((a * 3 + p) // 2)


if __name__ == '__main__':
    slove()

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

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

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

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

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

pie = a*3+p

print(pie//2)

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

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

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

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


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

Solution (Python):
INPUT = list(map(int,input().split()))
A = INPUT[0]
P = INPUT[1]

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

Solution (Python):

A, P = map(int, open(0).read().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)