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

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

Submission status: Accepted

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

app = 3*a + p
pie = 0

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

print(pie)

Submission status: Accepted

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

P += 3*A

print(P//2)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n,k = map(int,input().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A,P = map(int,input().split())
B = A*3 + P
print(int(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:
i = list(map(int, input().split())) #i_1 i_2を取得し、iに値を入れる
A = i[0] #出力：i_1
P = i[1] #出力：i_2

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

x = (A * 3) + P

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

print(int(y))

Submission status: Accepted

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

b=3*a+p

print(b//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
# int(input()) # 入力が1つ
a, p = map(int, input().split()) # 入力が複数
# [int(i) for i in input().split()] # 配列で数字

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

Submission status: Accepted

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

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

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 = int(p/2)
print(ans)

Submission status: Accepted

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

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

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

print(ans)

Submission status: Accepted

Solution code:
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()))
# 入力全てを整数に変換して1引いたものの配列を受け取る
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)

Submission status: Accepted

Solution code:




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


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

pieces = A*3 + P

print(pieces//2)

Submission status: Accepted

Solution code:
import math

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

x = 3*A + P

print(math.floor(x/2))

Submission status: Accepted

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

# a,p = map(int, "1 3".split())


cnt = a * 3 + p

print(int(cnt/2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(su//2)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
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)

Submission status: Accepted

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

# リンゴ -> リンゴのかけら×３
# リンゴのかけら×２ -> アップルパイ

P = P + 3 * A

AP = P // 2

print(AP)

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


if __name__ == '__main__':
    q1()

Submission status: Accepted

Solution code:
# python 3.4.3
import sys
input = sys.stdin.readline

# -------------------------------------------------------------
# library
# -------------------------------------------------------------



# -------------------------------------------------------------
# main
# -------------------------------------------------------------
A,P = map(int,input().split())

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import product                # product(iter, repeat=n)
# from itertools import accumulate             # accumulate(iter[, f])
# from functools import reduce                 # reduce(f, iter[, init])
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from fractions import gcd                    # for Python3.4.3


def main():
    mod = 10000007                  # 10^9+7
    inf = float('inf')
    input = sys.stdin.readline      # 改行文字が残ることに注意
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def ii():  return int(input())
    def mi():  return map(int, input().rstrip().split())
    def lmi(): return list(map(int, input().rstrip().split()))
    def li():  return list(input().rstrip())
    
    
    a, p = mi()
    print((p + a*3) // 2)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

print(pie)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC 128: A – Apple Pie
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,P=map(int,input().split())
S=((3*A)+P)//2
print(S)

Submission status: Accepted

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


input = sys.stdin.readline

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

Submission status: Accepted

Solution code:
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect
#pypyではscipy, numpyは使えない
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson, minimum_spanning_tree
#from scipy.sparse import csr_matrix, coo_matrix, lil_matrix
#import numpy as np
from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')

def main():
  a, p = map(int, readline().split())
  print((3*a+p)//2)
  
  
  
  
if __name__ == '__main__':
  main()

Submission status: Accepted

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

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

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:
import itertools
import fractions
def main():
  a,p = map(int,input().split())
  sur = p % 2
  print((p//2) + ((a*3)+sur)//2)
if __name__ == '__main__':
  main()

Submission status: Accepted

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

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

if __name__ == '__main__':
    resolve()

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())
if A % 2 == 1 and P % 2 == 1:
    print(A*3//2+(P//2)+1)
else:
    print(A*3//2+(P//2))

Submission status: Accepted

Solution code:
import sys

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

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

if __name__ ==  '__main__':
    main()

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

Submission status: Accepted

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

ap = a*3 + p

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

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

tmp = a*3

print((p+tmp)//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

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

Submission status: Accepted

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

print(A_N//2)

Submission status: Accepted

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

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

print(answer)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# from math import factorial,sqrt
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# import scipy as scp

# 入力の受け取り
a,p = map(int,input().split())

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

print(ans)
# print("{:.10f}".format(ans))
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    N, M = map(int, input().split())
    return (N*3+M) // 2

print(solve())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *
from math import *

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

sum = a * 3 + p

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

Submission status: Accepted

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

r = (a * 3) + b

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

Submission status: Accepted

Solution code:
N_apple, N_P = map(int, input().split())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import os


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

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


if __name__ == '__main__':
    main()

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

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

Submission status: Accepted

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

print(int(s/2))

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

sys.setrecursionlimit(1000000)
mod = 1000000007

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

#Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import bisect
# from collections import Counter, defaultdict, deque
# import copy
# from heapq import heappush, heappop, heapify
# from fractions import gcd
# import itertools
# from operator import attrgetter, itemgetter
# import math

import sys

# import numpy as np

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
A,P = map(int,input().split())
#りんごの破片の合計
sum_P = A*3 + P
#アップルパイの数
sum_AA = sum_P // 2
print(sum_AA)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(A: int, P: int):
    print((3*A+P)//2)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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:
stdin = input().split(" ")
A = int(stdin[0])
P = int(stdin[1])

P += A * 3

print(P//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

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

sum = a*3+p

print(sum//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding:utf-8 -*-

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

if __name__=='__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

pie = P // 2
print(pie)

Submission status: Accepted

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

total=muss*3+piece
print(total//2)

Submission status: Accepted

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

A,P = list(map(int, input().rstrip().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 = [int(_) for _ in 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:
A,P = map(int,input().split())

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

Submission status: Accepted

Solution code:
import math

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

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