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




P = P + 3 * A

AP = P // 2

print(AP)

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 = A * 3 + P
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,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):
def q1():
    A,P = (int(i) for i in input().split())
    sum = A * 3 + P
    ans,_ = divmod(sum, 2)
    print(ans)


if __name__ == '__main__':
    q1()

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

import sys
input = sys.stdin.readline










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

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

Solution (Python):
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

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

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

Solution (Python):
a,b = map(int,input().split())
print((3*a+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):
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

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

if __name__ == '__main__':
    main()

Solution (Python):


import sys













def main():
    mod = 10000007                  
    inf = float('inf')
    input = sys.stdin.readline      
    sys.setrecursionlimit(10**6)    
    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())
    
    
    a, p = mi()
    print((p + a*3) // 2)

if __name__ == "__main__":
    main()

Solution (Python):


import sys













def main():
    mod = 10000007                  
    inf = float('inf')
    input = sys.stdin.readline      
    sys.setrecursionlimit(10**6)    
    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())
    
    
    a, p = mi()
    print((p + a*3) // 2)

if __name__ == "__main__":
    main()

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

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

print(pie)

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

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

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

Solution (Python):

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


input = sys.stdin.readline

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

Solution (Python):
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect




from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')

def main():
  a, p = map(int, readline().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):
import math
p,q= input().split()
a,b =(int(p), int(q))
b += a*3
n = b/2
print(math.floor(n))

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

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

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

Solution (Python):
import itertools
import fractions
def main():
  a,p = map(int,input().split())
  sur = p % 2
  print((p//2) + ((a*3)+sur)//2)
if __name__ == '__main__':
  main()

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

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

if __name__ == '__main__':
    resolve()

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

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

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

Solution (Python):
import sys

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

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

if __name__ ==  '__main__':
    main()

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

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

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

ap = a*3 + p

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

tmp = a*3

print((p+tmp)//2)

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


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

Solution (Python):
A,N = map(int,input().split())
A_N = A*3 + N

print(A_N//2)

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

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

print(answer)

Solution (Python):
import math

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

ans=math.floor((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())

chunk = 3*a +p
ans = chunk//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):
def solve():
    N, M = map(int, input().split())
    return (N*3+M) // 2

print(solve())

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

Solution (Python):
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *
from math import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

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

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

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

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

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

sum = a * 3 + p

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

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

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

r = (a * 3) + b

print(r // 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(round((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):
N_apple, N_P = map(int, input().split())

summ = 3 * N_apple + N_P
ans = summ // 2

print(ans)

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

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

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

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

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


if __name__ == '__main__':
    main()

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

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

Solution (Python):
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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


if __name__ == '__main__':
    main()

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):
import math
A, P = input().split()
A = int(A)
P = int(P)

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

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

print(int(s/2))

Solution (Python):
import math

a,p=(map(int,input().split()))
if a>0:
  p=int(a*3+p)
elif a==0:
  pass
if p%2==1:
  print(math.floor(p/2))
else:
  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())
print((a*3+p)//2)

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

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

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

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

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    a,p = LI()
    p += 3*a
    print(p>>1)
    return


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

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

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

Solution (Python):

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

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

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

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

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

Solution (Python):









import sys



ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

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

if __name__ == '__main__':
    main()

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

sum_P = A*3 + P

sum_AA = sum_P // 2
print(sum_AA)

Solution (Python):
a, p = list(map(int, input().split()))
ap = a * 3 + p
print(ap // 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 sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

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

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

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

Solution (Python):
from sys import stdin

a, p = (int(x) for x in stdin.readline().rstrip().split())
print(((3*a)+p)//2)

Solution (Python):

import sys


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):
stdin = input().split(" ")
A = int(stdin[0])
P = int(stdin[1])

P += A * 3

print(P//2)

Solution (Python):
line = input().split(' ')
a = int(line[0])
p = int(line[1])
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())

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

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

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

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

sum = a*3+p

print(sum//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):



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

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

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

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

pie = P // 2
print(pie)

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

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

total=muss*3+piece
print(total//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 = list(map(int, input().rstrip().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((A*3+P)//2)

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

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

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

pie = (3*A + P) / 2
if pie*2 % 2 == 0:
    print(int(pie))
elif pie*2 % 2 == 1:
    print(int(pie - 0.5))

Solution (Python):
import math

number = input().split(" ")
A = int(number[0])
P = int(number[1])
apple = (A * 3) + P
print(math.floor(apple / 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())

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a, p = MAP()

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

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

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

i = (3*a + p)/2

print(int(i))

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

sum_apple = 3 * A + P

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

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

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

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

if A == 0 and P < 2:
	print(0)
else:
	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= input().split(" ")
b = 3 * int(a)
c = (b + int(p)) // 2
print(c)

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

if __name__ == '__main__':
    resolve()

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

p += a * 3

print(p // 2)

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

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

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

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

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

Solution (Python):
import sys

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

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

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

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

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

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

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

Solution (Python):
import os, sys, re, math

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

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

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

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

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

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

a = A*3 + P

if a > 0:
  print(int(a/2))
else:
  print(0)

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

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

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

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

    p += a * 3

    print(p//2)

if __name__ == '__main__':
    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((3 * a + 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((3*a+p)//2)

Solution (Python):

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

Solution (Python):
a, p = [int(i) for i in 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):
def LI():
  return [int(s) for s in input().split()]

A,P = LI()

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):
apple, peace = (int(i) for i in input().split())
peace += apple*3
print(peace//2)

Solution (Python):
import sys

stdin = sys.stdin

mod = 1000000007
inf = 1 << 60

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()
nas = lambda: stdin.readline().split()

a, p = na()

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

Solution (Python):
import sys
import math

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

A = num[0]
P = num[1]
parts = A*3+P
print(math.floor(parts/2))

Solution (Python):
import math
app, p = (int(x) for x in input().split())
pie = math.floor((app*3+p)/2)
print(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())
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())
print((3*a+p)//2)

Solution (Python):

si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))
a,p=nm()
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())

p = (A * 3) + P

pie, m = divmod(p, 2)

print(pie)

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

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

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

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

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

cut = a * 3
total = cut + 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())
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())

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

print(ans)

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

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

print(int(r))

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

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