Problem:
 Score : 100 points    Problem Statement We have A apples and P pieces of apple.  We can cut an apple into three pieces of apple, and make one apple pie by simmering two pieces of apple in a pan.  Find the maximum number of apple pies we can make with what we have now.      Constraints  All values in input are integers.  0 \leq A, P \leq 100         Input Input is given from Standard Input in the following format:  A  P       Output Print the maximum number of apple pies we can make with what we have.        Sample Input 1 1 3      Sample Output 1 3  We can first make one apple pie by simmering two of the three pieces of apple. Then, we can make two more by simmering the remaining piece and three more pieces obtained by cutting the whole apple.       Sample Input 2 0 1      Sample Output 2 0  We cannot make an apple pie in this case, unfortunately.       Sample Input 3 32 21      Sample Output 3 58

Solution (Python):
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_tuple(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H):
    '''
    H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) 
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_matrix(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    


MOD = 10**9 + 7
INF = 2**31  

from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  


A, P = read_ints()
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):
import math
import string
import collections
from collections import Counter


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


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor



dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
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):
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 += a * 3
print(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=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((a*3+p)>>1)

Solution (Python):
import sys
from collections import Counter
from collections import deque
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

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

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

if __name__ == "__main__":
  resolve()

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

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


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


if __name__ == '__main__':
    resolve()

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

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

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

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

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


if __name__ == "__main__":
    main()

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

Solution (Python):
import sys
import math
import bisect

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






import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr


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





A,P = inputIL()

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

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

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

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

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

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

Solution (Python):

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

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

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

if __name__ == '__main__':
    main()

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd
import sys
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = float('inf')


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

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


if __name__ == '__main__':

    ABC_128_A()

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 apple_pie(a, p):

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

if __name__ == '__main__':
    main()

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

Solution (Python):


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

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

Solution (Python):

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

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

print(applepie)

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

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

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

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

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

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

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

Solution (Python):

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

Solution (Python):

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

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

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

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

Solution (Python):


import math

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

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

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


if __name__ == '__main__':
    main()

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

if __name__ == "__main__":
  resolve()

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


if __name__ == '__main__':
    main()

Solution (Python):
import numpy as np
import math

def solve():
    a, p = map(int, input().split())
    print((a*3+p)//2)
    return 0

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
print(eval(input().replace(" ","*3+"))//2)

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

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

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

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

pieces = 3*A+P

print(pieces//2)

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

Solution (Python):
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd 
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) 

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

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

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

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

print(pai)

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

Solution (Python):

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

num = 3*a + p

print(int(num//2))

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

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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
from itertools import permutations,  combinations, accumulate
from functools import *
from collections import deque, defaultdict, Counter
from heapq import heapify, heappop, heappush, heappushpop

INF = float('inf')
NIL = - 1


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

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

kakera = a * 3 + p

print(kakera // 2)

Solution (Python):
import sys
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((a * 3 + p) // 2)

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

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):
import math
x = input().split()
a = int(x[0])
p = int(x[1])
print(math.floor((a * 3 +p) / 2))

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

Solution (Python):
inp = input()
A = int(inp.split()[0])
P = int(inp.split()[1])
result = int((A*3+P)/2)
print(result)

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

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

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

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

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

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

pie = parts // 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(" "))

B=A*3+P
Ans=B//2

print(Ans)

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

Solution (Python):

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

Solution (Python):
s = input().split()
a = int(s[0])
p = int(s[1])
all_p = a * 3 + p
apple_pie = int(all_p / 2)
print(apple_pie)

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 time
startTimeProblem=time.time()

import fileinput, sys, itertools
from math import *
from bisect import *
from heapq import *
from collections import *

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

class InputHelper:
    def __init__(self):
        self.myinput = fileinput.input()

    def isLocal(self):
        return not fileinput.isstdin()

    def int(self):
        return int(self.myinput.readline().rstrip())

    def ints(self):
        return [int(_) for _ in self.myinput.readline().rstrip().split()]

    def str(self):
        return self.myinput.readline().rstrip()

    def strs(self):
        return [_ for _ in self.myinput.readline().rstrip().split()]

class OutputHelper:
    def int(self, a):
        print(a)    

    def ints(self, a):  
        print(" ".join([str(_) for _ in a]))
    
    def intsNL(self, a):
        for _ in a:
            print(_)
    
    def str(self, s):
        print(s)

    def strs(self, s):
        print(" ".join([_ for _ in s]))

    def strsNL(self, s):
        for st in s:
            print(st)

class ListNode:
    def __init__(self, val):
        self.val = val
        self.next = None
        self.prev = None

In = InputHelper()
Out = OutputHelper()



A, P = In.ints()

P += 3*A





print(P//2)




if len(sys.argv)>2 and sys.argv[2]=="TIMEIT":
    fin = (time.time()-startTimeProblem)*1000
    print("{:.2f}".format(fin) + "ms")

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

Solution (Python):
a, p = map(int, input().split())
p += 3*a
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())
print((3*a+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, groupby
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
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())

app = 3*a + p
pie = 0

while app >= 2:
    app -= 2
    pie += 1

print(pie)

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

P += 3*A

print(P//2)

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

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

print((n*3+k)//2)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

x = (A * 3) + P

if x >= 2:
  y = x / 2
else:
  y = 0

print(int(y))

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

b=3*a+p

print(b//2)

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

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

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

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

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

p += a*3
ans = int(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())
if 3*a+p < 2:
  print(0)
elif (3*a+p) % 2 == 0:
  print((3*a+p)//2)
else:
  print((3*a+p-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())
P+=A*3
print(P//2)

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

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

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

print(ans)

Solution (Python):
import sys


def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())

def LI(): return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number): return [LI() for _ in range(rows_number)]

p2D = lambda x: print(*x, sep="\n")


a,p = MI()

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

Solution (Python):




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


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

print(pie)

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

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

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

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

pieces = A*3 + P

print(pieces//2)

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

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

Solution (Python):
import math

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


x = 3*A + P

print(math.floor(x/2))

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




cnt = a * 3 + p

print(int(cnt/2))

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

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

Solution (Python):
import math

inputted = list(map(int, input().split()))
A = inputted[0]
P = inputted[1]

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

print(answer)

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

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

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

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

print(su//2)

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

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

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

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

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

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

Solution (Python):

import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

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