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



Sample input:
1 3


Sample output:
3

Submission status: Accepted

Solution code:
# coding=utf-8

###
### for atcorder program
###

import sys
import math
import array

# math class
class mymath:
    ### pi
    pi = 3.14159265358979323846264338

    ### Prime Number
    def pnum_eratosthenes(self, n):
        ptable = [0 for i in range(n+1)]
        plist = []

        for i in range(2, n+1):
            if ptable[i]==0:
                plist.append(i)
                for j in range(i+i, n+1, i):
                    ptable[j] = 1
        return plist

    ### GCD
    def gcd(self, a, b):
        if b == 0:
            return a
        return self.gcd(b, a%b)

    ### LCM
    def lcm(self, a, b):
        return (a*b)//self.gcd(a,b)

mymath = mymath()

### output class
class output:
    ### list
    def list(self, l):
        l = list(l)
        print(" ", end="")
        for i, num in enumerate(l):
            print(num, end="")
            if i != len(l)-1:
                print(" ", end="")
        print()

output = output()

### input sample
#i = input()
#A, B, C = [x for x in input().split()]
#N, K = [int(x) for x in input().split()]
#inlist = [int(w) for w in input().split()]
#R = float(input())
#A = [int(x) for x in input().split()]
#for line in sys.stdin.readlines():
#    x, y = [int(temp) for temp in line.split()]

### output sample
#print("{0} {1} {2:.5f}".format(A//B, A%B, A/B))
#print("{0:.6f} {1:.6f}".format(R*R*math.pi,R*2*math.pi))
#print(" {}".format(i), end="")

def main():
    A, P = [int(x) for x in input().split()]
    P += A*3
    print(P//2)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

n=a*3

p=p+n

print(p//2)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,P = map(int, input().split() )
result = 0

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

Submission status: Accepted

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

amount = A * 3 + P

print(amount // 2)

Submission status: Accepted

Solution code:
a, p = (int(_) for _ in input().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ap = A*3 + P

print(ap//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

apple_cut = A * 3

apple_pie = (apple_cut + P) /2
                 
print(int(apple_pie))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

Solution code:
[A,B] = [int(e) for e in input().split()]

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

Submission status: Accepted

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

def calculate(a, p):
    n = 0
    n += (a*3 + p)/2
    print(int(n))

def main(a, p):
    if __name__ == "__main__":
        calculate(a, p)

main(a, p)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a_, p_ = input().split()
a = int(a_)
p = int(p_)

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

Submission status: Accepted

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

Submission status: Accepted

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

P += A * 3

print(P // 2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
w = input()
s = w.split()

apple = int(s[0])
piece = int(s[1])


answer = int(( 3 * apple + piece - (( 3 * apple + piece ) % 2 )) /2)

print(answer)

Submission status: Accepted

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

apple_slices = A * 3 + P

print(apple_slices // 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, P =input().strip().split()
A, P = [int(A), int(P)]
P = 3 * A + P

print(P // 2)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys

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

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

main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a, p = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: UTF-8
# sample code

v = list(map(int, input().split()))
a, p = v[0], v[1]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
apple,apple_piece = input().split()
apples = int(apple) * 3 + int(apple_piece)
apple_pie = apples // 2
print(apple_pie)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
stdin=input().split()
A=int(stdin[0])
P=int(stdin[1])

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

Submission status: Accepted

Solution code:
A, P = (int(i) for i in input().split())
  
N = (A*3+P%2)//2+P//2

print(N)

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def ii(): return int(stdin.readline())
def li(): return map(int, stdin.readline().split())
A, P = tuple(li())
ps = A * 3 + P
print(ps // 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, p = list(map(int, input().split()))
print('{}'.format((a * 3 + p) // 2))

Submission status: Accepted

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

Submission status: Accepted

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

B = 3*A

ans = (B+P) // 2

print(ans)

Submission status: Accepted

Solution code:
import math
import sys
sys.setrecursionlimit(10 ** 6 + 10)
from collections import defaultdict




def main():
    a, b = map(int, input().split())
    b += 3 * a

    print(b // 2)




if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from itertools import product
import bisect
import sys


def input():
    return sys.stdin.readline()[:-1]


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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = input().split()
apple_piece = 3*int(s[0])+int(s[1])
print(apple_piece//2)

Submission status: Accepted

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

p += a*3

print(p//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = input().split(" ")
total = (int(a[0]) * 3 + int(a[1])) // 2

print(total)

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

SUM = a * 3 + p

print(int(SUM / 2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

piece = a*3 + p

pie = piece//2

print(pie)

Submission status: Accepted

Solution code:
import sys
def a():
    p = [[int(t) for t in r.split(' ')] for r in sys.stdin.read().split('\n') if r != '']
    A, P = p[0]
    print(int((A*3+P)/2))
a()

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a, p = map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, P = map(int,input().split())
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python
# coding: UTF-8

a,p = input().split()

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

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

Submission status: Accepted

Solution code:
import math

a,b=map(int,input().split())
aa=int(a)
bb=int(b)

c=math.floor(int((3*aa+bb)/2))
print(c)

Submission status: Accepted

Solution code:
import math
A, P = map(int, input().split(' '))

piece = A * 3 + P
result = math.floor(piece / 2.0)

print(int(result))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, p = [int(x) for x in input().split()]
piece = a * 3 + p

print(int(piece / 2))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = (input().split())

x=int(a[0])*3
y=int(a[1])

z=x+y

print(z//2)

Submission status: Accepted

Solution code:
a, b = [int(i) for i in input().split()]

ringo = a * 3  + b
pai = ringo // 2


print(pai)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
import numpy as np

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

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

Submission status: Accepted

Solution code:
def InputToInt():
    A = input().split()
    for i in range(len(A)):
        A[i] = int(A[i])
    return A
    
if __name__ == '__main__':
    N, M = InputToInt()
    print(int((N*3+M)/2))

Submission status: Accepted

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


main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,P = map(int, input().split())			# "5 7" -> ["5", "7"] -> 5, 7 => N=5,K=7

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

print(ans)

Submission status: Accepted

Solution code:
def pie(A, P):
    P_cra = A*3
 
    P_all = P_cra + P
 
    pie = P_all//2
 
    print(pie)

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

Submission status: Accepted

Solution code:
def run(A, P):
    return (A*3 + P)//2


def main():
    A, P = map(int, input().split())
    print(run(A, P))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
rr = lambda: sys.stdin.readline().strip()
rri = lambda: int(rr())
rrs = lambda: [int(_) for _ in rr().split()]

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# 2019/05/26
# AtCoder Beginner Contest 128 - A

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

# Calc
w_ans = 3 * a + p
ans = int(w_ans / 2)

# Output
print(ans)

Submission status: Accepted

Solution code:
A,P = map(int,input().split())
A_crash = A * 3
apple_crash = A_crash + P
apple_pie = apple_crash // 2
print(apple_pie)

Submission status: Accepted

Solution code:
args = input().split()
A, P = int(args[0]), int(args[1])
sum = A * 3 + P
result = sum // 2
print(result)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#入力取得
A, P = map(int, input().split())


P += A*3

print(int(P/2))

Submission status: Accepted

Solution code:
#coding:utf-8
A,P = map(int,input().split())
print (int((A*3+P)/2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(pie)

Submission status: Accepted

Solution code:
#d=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
#import numpy as np
#n=int(input())
#import fractions
#S=input()
#import math
#n=int(input())

lis=list(map(int,input().split()))
ans=lis[0]*3+lis[1]
ans=ans-ans%2
ans=int(ans/2)

print(ans)

Submission status: Accepted

Solution code:
a, p = map(lambda x: int(x), input().split(' '))

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

Submission status: Accepted

Solution code:
def inpl():
    return list(map(int, input().split()))


A, P = inpl()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

def readInt():
    return int(input())

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

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

n = a*3 + p

print(int(n/2))

Submission status: Accepted

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

P += 3 * A



ans = int(P // 2)

print(int(ans))

Submission status: Accepted

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

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

print(apple_pi)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)

# n = int(input())
# a, b = map(int, input().split())
# int_list = list(map(int, input().split()))
# l = list(input().split())

def solve():
    a, p = map(int, input().split())

    n_frac = a * 3 + p
    n_pi = n_frac // 2
    print(n_pi)
solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

a, b = input().split()
a, b = int(a), int(b)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


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))  # type: int
    P = int(next(tokens))  # type: int
    solve(A, P)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

a,p = input().split()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

INPUT = input().split()

A = int(INPUT[0])
P = int(INPUT[1])

crashApple = A * 3

fff = crashApple + P

print(fff // 2)

Submission status: Accepted

Solution code:

input_data = input().split()
a = int(input_data[0])
p = int(input_data[1])

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun May 26 21:04:24 2019

@author: yuta
"""

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

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

main(A,P)

Submission status: Accepted

Solution code:
# coding: UTF-8

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

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

else:
    print(int((3*A+P-1)/2))

Submission status: Accepted

Solution code:
a,b=(int(x) for x in input().split())

x= int(((a*3 +b) /2))

print (x)

Submission status: Accepted

Solution code:
x, y = map(int, input().split())
apple_piece_num = 3*x + y
valid_pie_num = apple_piece_num // 2
print(valid_pie_num)

Submission status: Accepted

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

x = A * 3
y = x + P

print(y//2)

Submission status: Accepted

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

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

Submission status: Accepted

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

a_piece = A * 3

total = a_piece + P

apple_pi = total / 2

print(int(apple_pi))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-

def solve():
    A, P = list(map(int, input().split()))
    sum_kakera  = A*3 + P

    ans = sum_kakera // 2

    print(ans)

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
a, p = [int(c) for c in input().split()]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, p =(int(x) for x in input().split())

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]


    token = lines[0].split()
    a = int(token[0])
    p = int(token[1])

    return (a, p)


def solve(a, p):

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




def main():
    # 出力

    print("%s" % solve(*parse_input()))

if __name__ == '__main__':

    main()

Submission status: Accepted

Solution code:
"""
import sys
sys.setrecursionlimit(10**9)
N=int(input())
D=[]
for i in range(N):
  s,p=input().split()
  D.append((s, int(p), i+1))
D.sort(key=lambda d: (d[0], -d[1], d[2]))

for d in D:
  print(d[2])
"""
A,P=map(int, input().split())
print((A*3+P)//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X=input()
X=X.split()
A,P=int(X[0]),int(X[1])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
A, P = [int(_) for _ in stdin.readline().rstrip().split()]
print((A*3+P) // 2)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
apple, tip = map(int,input().split())

material = 3 * apple + tip
pie = material // 2

print(pie)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

P += A * 3

print(math.floor(P / 2))

Submission status: Accepted

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

pic =  (A*3)+P

print(pic //2)

Submission status: Accepted

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

def crush(A):
    return A * 3

def create_apple_pie(piece):
    return piece // 2

print(create_apple_pie(crush(a) + p))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,P = (int(x) for x in input().split())
print(int((A * 3 + P) / 2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,B = (int(i) for i in input().split()) 
C=3*A
D=int(0)
if (C+B)%2==1:
    D=(C+B-1)/2
else:
    D=(C+B)/2
print('%d'%D)

Submission status: Accepted

Solution code:
def main():
    A, P = [int(ele) for ele in input().split()]
    ans = int((3*A+P)/2)
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,m = map(int,input().split())
ans = (n*3+m)/2
print(int(ans))

Submission status: Accepted

Solution code:
i = list(input().split(' '))

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

Submission status: Accepted

Solution code:
app, ap_chip = map(int,list(input().split()))


ap_chip += app*3


print(int(ap_chip/2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
INPUT = sys.stdin.readline

def SINGLE_INT(): return int(INPUT())
def MULTIPLE_INT_LIST(): return list(map(int, INPUT().split()))
def MULTIPLE_INT_MAP(): return map(int, INPUT().split())
def SINGLE_FLOAT(): return float(INPUT())
def MULTIPLE_FLOAT_LIST(): return list(map(float, INPUT().split()))
def MULTIPLE_FLOAT_MAP(): return map(float, INPUT().split())
def SINGLE_STRING(): return INPUT()
def MULTIPLE_STRING(): return INPUT().split()

A, B = MULTIPLE_INT_MAP()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

inp = input()
nu = inp.rfind(' ')
A = inp[:nu:]
P = inp[nu+1::]
A, P = int(A), int(P)

piece = 3 * A + P

print(math.floor(piece / 2))

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
a = list(map(int, input().split()))
print(int((a[0]*3+a[1])/2))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

kakera = A * 3 + P

pie = kakera // 2

print(pie)

Submission status: Accepted

Solution code:
n =input().split()

num1 =  ( int(n[0]) * 3 + int(n[1])) // 2

print(num1)

Submission status: Accepted

Solution code:
import sys
A, P = (int(i) for i in input().split())
if int((A*3+P)) > 0:
    print(int((A*3+P)/2))
else:
    print(0)

Submission status: Accepted

Solution code:
# -- coding:utf-8 --
a,p=map(int,input().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
apple, piece = input().split()
resource = int(piece) + (int(apple)*3)
pie = resource// 2
print(pie)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

k = A * 3

a = (P + k) / 2

print(int(a))

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, p = [int(a) for a in input().split()]

c = 3 * a + p

result = int(c / 2)

print(result)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

print(b)

Submission status: Accepted

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