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

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

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

c = a *3 + b

print(int(c/2))

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LS()
    return l
sys.setrecursionlimit(1000000)
mod = 1000000007


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


def B():
    n = I()

    return


def C():
    n = I()

    return


def D():
    n = I()

    return


def E():
    n = I()

    return


def F():
    n = I()

    return


if __name__ == "__main__":
    A()

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

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

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

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

Solution (Python):
def li():
    return list(map(int, input().split()))


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

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

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

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

Solution (Python):
if __name__ == '__main__':
    import sys
    input = sys.stdin.readline

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

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

Solution (Python):

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


if __name__ == "__main__":
    main()

Solution (Python):
from sys import stdin

def main():
     n,m = [int(x) for x in stdin.readline().split()]
     print((3*n+m)//2)

if __name__ == '__main__':
     main()

Solution (Python):
def getN():
    return int(input())

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

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

a,p = getMN()

p += a * 3

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

if __name__ == '__main__':
    Solution().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):
import math
a,b = map(int, input().split())
b += 3 * a
print(math.floor(b/2))

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

P += A*3
print(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())
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 sys
import collections
ns = lambda: sys.stdin.readline().rstrip()
ni = lambda: int(ns())
nm = lambda: map(int, sys.stdin.readline().split())
nl = lambda: list(nm())
nsm = lambda: map(str, sys.stdin.readline().split())

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

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

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

Solution (Python):


import sys
import math

import array
import bisect
import collections
from collections import Counter, defaultdict
import fractions
import heapq
import re

sys.setrecursionlimit(1000000)


def array2d(dim1, dim2, init=None):
    return [[init for _ in range(dim2)] for _ in range(dim1)]

def argsort(l, reverse=False):
    return sorted(range(len(l)), key=lambda i: l[i], reverse=reverse)

def argmin(l):
    return l.index(min(l))

def YESNO(ans, yes="YES", no="NO"):
    print([no, yes][ans])

II = lambda: int(input())
MI = lambda: map(int, input().split())
MIL = lambda: list(MI())
MIS = lambda: input().split()


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


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

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

tmp = P + A * 3

print(int(tmp / 2))

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

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

t = A * 3 + P

print(int(t // 2))

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

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

Solution (Python):
from sys import stdin
import math
import fractions
from collections import deque

INF = 10 ** 10

A, P = [int(x) for x in stdin.readline().rstrip().split()]

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

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

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

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

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

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

Solution (Python):
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]






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

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

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

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

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

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

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

P += 3 * A

print(P // 2)

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

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

Solution (Python):
inpl = lambda: list(map(int,input().split()))
A, P = inpl()
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):
import math
import fractions
import copy

def j(q):
    if q==1: print("YES")
    elif q == 0:print("NO")
    exit(0)
rem = pow(10,9)+7
"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def printrow(a):
    for i in range(len(a)):
        print(a[i])
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)



m,n= (int(i) for i in input().split())       








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

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

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

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7

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

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

main()

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

Solution (Python):
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys

sys.setrecursionlimit(10000)
INF = float('inf')



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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import sys, math, collections, heapq, itertools
F = sys.stdin
def single_input(): return F.readline().strip("\n")
def line_input(): return F.readline().strip("\n").split()
def gcd(a, b):
    a, b = max(a, b), min(a, b)
    while a % b > 0: a, b = b, a % b
    return b
  
def solve():
    A, P = map(int, line_input())
    total = P + A * 3
    print(total//2)
    return 0
  
if __name__ == "__main__":
    solve()

Solution (Python):







import math, itertools, operator
from math import *
from math import factorial as fact
from operator import itemgetter, attrgetter
from itertools import permutations, combinations
from functools import reduce


from fractions import gcd

inf = float('inf')

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

def perm(a, b):
    import scipy.special
    return scipy.special.perm(a, b, exact = True)

def comb(a, b):
    import scipy.special
    return scipy.special.comb(a, b, exact = True)

def dfact(n):
    import scipy.special
    return scipy.special.factorial2(n, exact = True)

def prod(l):
    return reduce(operator.mul, l)

def input_ints(inp = input, sep = ' ', conv = int):
    return map(conv, inp().split(sep = sep))



A, P = input_ints()

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

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

def main():
    input = sys.stdin.readline
    A, P = map(int, input().split())

    return (3*A + P) // 2


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

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

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

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

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

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

a_p = a*3

print((a_p + p) // 2)

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

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

Solution (Python):




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

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

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 + P)//2)

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

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

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

print(P//2)

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

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

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

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

def main():
    buf = input()
    buflist = buf.split()
    A = int(buflist[0])
    P = int(buflist[1])
    P += A * 3
    print(P // 2)

if __name__ == '__main__':
    main()

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

Solution (Python):

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

Solution (Python):
def main():
    from sys import stdin, stdout

    def read():
        return stdin.readline().rstrip('\n')

    def read_array(sep=None, maxsplit=-1):
        return read().split(sep, maxsplit)

    def read_int():
        return int(read())

    def read_int_array(sep=None, maxsplit=-1):
        return [int(a) for a in read_array(sep, maxsplit)]

    def write(*args, **kwargs):
        sep = kwargs.get('sep', ' ')
        end = kwargs.get('end', '\n')
        stdout.write(sep.join(str(a) for a in args) + end)

    def write_array(array, **kwargs):
        sep = kwargs.get('sep', ' ')
        end = kwargs.get('end', '\n')
        stdout.write(sep.join(str(a) for a in array) + end)

    a, p = read_int_array()
    write((a * 3 + p) // 2)

main()

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)


def main():
    n,p = LI()
    p += n * 3

    return p // 2


print(main())

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, log2
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

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

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline
inf = float('inf')
mod = 10**9+7


def INT_(n): return int(n)-1


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


def MF(): return map(float, input().split())


def MI_(): return map(INT_, input().split())


def LI(): return list(MI())


def LI_(): return [int(x) - 1 for x in input().split()]


def LF(): return list(MF())


def LIN(n: int): return [input() for _ in range(n)]


def LLIN(n: int): return [LI() for _ in range(n)]


def LLIN_(n: int): return [LI_() for _ in range(n)]


def LLI(): return [list(map(int, l.split())) for l in input()]


def I(): return int(input())


def F(): return float(input())


def ST(): return input().replace('\n', '')


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


if __name__ == '__main__':
    main()

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

Solution (Python):

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

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

Solution (Python):


import itertools
from collections import Counter
from collections import defaultdict
import bisect

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 = list(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 array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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

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