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: Wrong Answer

Solution code:
A,P=map(int,input().split())
ans,maru,kakera = 0,0,0
def is_even(num):
    return num % 2 == 0
maru=3*A//2
if P==0:
    kakera=0
else:
    if is_even(A) == True:
        kakera = P//2
    else:
        kakera = P//2+1
ans=maru+kakera
print(ans)

Submission status: Wrong Answer

Solution code:
import random

random.seed(1)
Apple = random.randint(0,101)
Piece = random.randint(0,101)
Pie = 0

def BreakApple():
    global Apple
    while Apple >=1 :
        Apple -= 1
        global Piece
        Piece += 3

def MakePie():
    global Piece
    while Piece >= 3:
        Piece -= 2
        global Pie
        Pie += 1

BreakApple()
MakePie()
print(Pie)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
A,P=map(int,input().split())
ans,maru,kakera = 0,0,0
def is_even(num):
    return num % 2 == 0
if P==0:
    maru=3*A//2
else:
    if is_even(A) == True:
        maru = 3*A
        kakera = P//2
    else:
        maru = 3*A//2
        kakera = P//2+1
ans=maru+kakera
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import random

random.seed(1)
Apple = random.randint(0,101)
Piece = random.randint(0,101)
Pie = 0

def BreakApple():
    global Apple
    while Apple > 0:
        Apple -= 1
        global Piece
        Piece += 3

def MakePie():
    global Piece
    while Piece > 0:
        Piece -= 2
        global Pie
        Pie += 1

BreakApple()
MakePie()
print(Pie)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import random

Apple = random.randint(0,101)
Piece = random.randint(0,101)
Pie = 0

def BreakApple():
    global Apple
    while Apple > 0:
        Apple -= 1
        global Piece
        Piece += 3

def MakePie():
    global Piece
    while Piece > 0:
        Piece -= 2
        global Pie
        Pie += 1

BreakApple()
MakePie()
print(Pie)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

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

Submission status: Wrong Answer

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

SUM = a * 3 + p

print(int(SUM / 2))

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(3*a//2)

Submission status: Wrong Answer

Solution code:
a,p=map(int, input().split())
def crush(A):
    return A * 3

def create_apple_pie(piece):
    return piece // 2

create_apple_pie(crush(a) + p)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

result = A*3//2
print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

c = 3 * a + p

result = int(p / 2)

print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

a = int(A/3)

ans = int((a + P)/2)

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

result = A*3//2

Submission status: Wrong Answer

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

b = a*3 + p

ans = int(b/2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!

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

Submission status: Wrong Answer

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

if 2 > P:
    print(0)
else:
    print(int((P+A*3)/2))

Submission status: Wrong Answer

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

P += A * 3

print(round(P / 2))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ringo = A*3 + P
ringo = ringo / 2
print("{:.0f}".format(ringo))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

sum = a*3 + b

p = sum/2

print(p)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

sum_apple = int(num[0])*3 + int(num[1])

print(sum_apple//3)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Time Limit Exceeded

Solution code:
OK = 0
NG = 10**10

mid = (OK+NG) // 2

s = 0
for i in range(mid):
    s += i

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

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

Submission status: Time Limit Exceeded

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


for i in range(10**111111):
  a =0

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC128 A

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

Submission status: Accepted

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

n = a * 3 + b

print(int(n // 2))

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

P = P + 3*A

print(P//2)

Submission status: Accepted

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

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())
hahen=a*3+p
print(hahen//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=(3*a+b)/2
import math
print(math.floor(c))

Submission status: Accepted

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

P = P + A*3

apple_pie = 0

while  P>1:
    
    apple_pie = apple_pie + 1
    P = P - 2
    
print(apple_pie)

Submission status: Accepted

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

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

P += A * 3

print(P // 2)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
hole_apple, piece_apple = map(int, input().split())

total_piece_apple = hole_apple * 3 + piece_apple
print(total_piece_apple // 2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solver():
    A, P = [int(n) for n in input().split()]
    return (A*3+P)//2

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

Submission status: Accepted

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

apple_fragment = A * 3 + P
apple_pie = apple_fragment // 2

print(apple_pie)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
# ABC128
# Apple Pie
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(((a * 3) + p) // 2)

Submission status: Accepted

Solution code:
#! /usr/bin/env python3
import sys
sys.setrecursionlimit(10**9)


INF=10**20
def solve(A: int, P: int):
    ans = 3*A+P
    ans //= 2

    print(ans)
    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:
def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    a, p = Input()
    x = a*3 + p
    ans = x//2
    print(ans)

main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    pieces = 3 * A + P
    ans = pieces // 2

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: UTF-8
import sys
import numpy as np


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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,P = (int(x) for x in 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())
print((a * 3 + b) // 2)

Submission status: Accepted

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

Submission status: Accepted

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

allpiece = 3*A + P

print(allpiece//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

P = P + A*3

print(P//2)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
LI = lambda: list(map(int, input().split()))

A, P = LI()


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


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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 問題：https://atcoder.jp/contests/abc126/tasks/abc128_a


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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(apple // 2)

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


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

Submission status: Accepted

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

Submission status: Accepted

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

if 3*A + P < 2:
    print('0')
else:
    print(math.floor((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:
a,b=map(int,input().split())
x=a*3+b
print(x//2)

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

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

Submission status: Accepted

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





if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))
#l = [list(map(int,input().split())) for i in range(n)]

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

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

Submission status: Accepted

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

# 取得
x, y = map(int, input().split())

z = (3*x + y) // 2

# 出力
print(z)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ary = list(map(lambda n: int(n), input().split(" ")))

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

Submission status: Accepted

Solution code:
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

A,P= LI()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
T,O = map(int,input().split())
T *= 3

if (T+O) /2 > 0:
  print(int((T+O)/2))
else:
  print("0")

Submission status: Accepted

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

def main():

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

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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# abc128_a.py
# https://atcoder.jp/contests/abc128/tasks/abc128_a

# A - Apple Pie /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 100点

# 問題文
# 林檎が A個、林檎の欠片が P個あります。
# 林檎 1個は、砕くことで林檎の欠片 3 個になります。また、林檎の欠片 2 個を鍋で煮込むことで、アップルパイが 1個作れます。
# 今ある材料で作れるアップルパイの最大数を求めてください。

# 制約
#     入力は全て整数である。
#     0≤A,P≤100

# 入力
# 入力は以下の形式で標準入力から与えられる。
# A P

# 出力
# 今ある材料で作れるアップルパイの最大数を出力せよ。

# 入力例 1
# 1 3

# 出力例 1
# 3

# 3つある林檎の欠片のうち 2 つを鍋で煮込むことで、まず 1 つのアップルパイを作ることができます。
# 林檎の欠片が 1 つ残りますが、これと、1 つある林檎を砕いて新しく得た 3 つの林檎の欠片から、さらに 2つのアップルパイを作れます。

# 入力例 2
# 0 1

# 出力例 2
# 0

# 残念ながら 1つもアップルパイを作ることができません。

# 入力例 3
# 32 21

# 出力例 3
# 58


global FLAG_LOG
FLAG_LOG = False


def log(value):
    # FLAG_LOG = True
    # FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    # S = lines[0]
    # N = int(lines[0])
    A, P = list(map(int, lines[0].split()))
    # values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[2].split()))
    # values = list()
    # for i in range(6):
    #     values.append(int(lines[i]))
    # valueses = list()
    # for i in range(M):
    #     valueses.append(list(map(int, lines[i+1].split())))

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

    return [result]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['1 3']
        lines_export = [3]
    if pattern == 2:
        lines_input = ['0 1']
        lines_export = [0]
    if pattern == 3:
        lines_input = ['32 21']
        lines_export = [58]
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n, k = (int(x) for x in input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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