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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 1000000007
sys.setrecursionlimit(1000000)

A, P = rl()

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

P += 3 * A

x = int(P / 2)
print(x)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#入力:N,M(int:整数)
def input2():
	return map(int,input().split())
  
a,p=input2()
ans=((a*3)+p)//2
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

if not ( 0 <= A <= 100 and 0 <= P <= 100 ): sys.exit()

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:
def main():
 a,p = 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())

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

print(P // 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input().split(" ")
a,b = int(s[0]), int(s[1])
if (a*3 + b) % 2 == 0:
  print(int((a*3 + b)/2))
else:
  print(int((a*3 + b - 1)/2))

Submission status: Accepted

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

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

Submission status: Accepted

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

p = p + a*3

print(p//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
data=input().split()
A=int(data[0])
P=int(data[1])
ans_pre=3*A+P
ans=ans_pre//2
print(ans)

Submission status: Accepted

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

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

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

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

while(a != 0):
    a -= 1
    p += 3

print(int(p / 2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7) #再帰関数の上限,10**5以上の場合python
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque, defaultdict
#deque(l), pop(), append(x), popleft(), appendleft(x)
#q.rotate(n)で → にn回ローテート
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate,combinations,permutations#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#heapify(q),heappush(q,a),heappop(q) #q=heapify(q)としないこと、返り値はNone
#import fractions#古いatcoderコンテストの場合GCDなどはここからimportする
from functools import reduce,lru_cache#pypyでもうごく
#@lru_cache(maxsize = None)#maxsizeは保存するデータ数の最大値、2**nが最も高効率
from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printe(*x):print("## ",*x,file=sys.stderr)
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 1000000007
    #w.sort(key=itemgetter(1),reverse=True)  #二個目の要素で降順並び替え

    #N = int(input())
    a,p = map(int, input().split())
    #A = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    #S = tuple(tuple(map(int, input().split())) for i in range(N)) #改行行列
    print((a*3+p)//2)





if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

a, b = rm()
print((a*3 + 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:
def main():
    a,b=map(int,input().split(' '))
    print(int((a*3+b)/2))

main()

Submission status: Accepted

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

Submission status: Accepted

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

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

apple = A*3 + P

print(apple // 2)

Submission status: Accepted

Solution code:
import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from math import factorial, sqrt, ceil, gcd
from functools import lru_cache, reduce
from decimal import Decimal
from operator import mul

INF = 1 << 60
MOD = 1000000007
sys.setrecursionlimit(10 ** 7)


# UnionFind
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

# ダイクストラ
def dijkstra_heap(s, edge, n):
    #始点sから各頂点への最短距離
    d = [10**20] * n
    used = [True] * n #True:未確定
    d[s] = 0
    used[s] = False
    edgelist = []
    for a,b in edge[s]:
        heapq.heappush(edgelist,a*(10**6)+b)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)
        #まだ使われてない頂点の中から最小の距離のものを探す
        if not used[minedge%(10**6)]:
            continue
        v = minedge%(10**6)
        d[v] = minedge//(10**6)
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])
    return d

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

    if temp!=1:
        arr.append([temp, 1])

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

    return arr

# 組合せnCr
def combinations_count(n, r):
    if n < r:
        return 0
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom

# 2数の最小公倍数
def lcm(x, y):
    return (x * y) // gcd(x, y)

# リストの要素の最小公倍数
def lcm_list(numbers):
    return reduce(lcm, numbers, 1)

# リストの要素の最大公約数
def gcd_list(numbers):
    return reduce(gcd, numbers)

# 素数判定
def is_prime(n):
    if n <= 1:
        return False
    p = 2
    while True:
        if p ** 2 > n:
            break
        if n % p == 0:
            return False
        p += 1
    return True


# limit以下の素数を列挙
def eratosthenes(limit):
    A = [i for i in range(2, limit+1)]
    P = []

    while True:
        prime = min(A)
        
        if prime > sqrt(limit):
            break
            
        P.append(prime)
            
        i = 0
        while i < len(A):
            if A[i] % prime == 0:
                A.pop(i)
                continue
            i += 1
            
    for a in A:
        P.append(a)
            
    return P

# 同じものを含む順列
def permutation_with_duplicates(L):

    if L == []:
        return [[]]

    else:
        ret = []

        # set（集合）型で重複を削除、ソート
        S = sorted(set(L))

        for i in S:

            data = L[:]
            data.remove(i)

            for j in permutation_with_duplicates(data):
                ret.append([i] + j)

        return ret

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

# ここから書き始める
a, p = map(int, input().split())
ans = (3 * a + p) // 2
print(ans)

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
c = 0
if b>=2:
    d = b // 2
    c += d
e = b % 2
f = a * 3
g = f+e
h = g // 2
c += h
print(c)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
a,p = map(int, input().split())

print(int((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())
ans = (3 * A + 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:
#50 characters hobe may be..
n = list(map(int, input().split()))

c = n[0]*3 + n[1]
print(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())
answer = (A*3 + P)//2
print(answer)

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

Submission status: Accepted

Solution code:
x, y = input("").split(" ")
a = int(x)
y = int(y)
print(int((3*a + y)/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())
val = A * 3 + B
print(val//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
try:
    a,p=map(int, input().split())
    assert 0<=a,p<=100
    print(((a*3)+p)//2)
except AssertionError:
    print('')

Submission status: Accepted

Solution code:
import sys

A, P = input().split()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
arr = input().split()
a = int(arr[0])
p = int(arr[1])

print((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:
import sys
sys.setrecursionlimit(10**6)

#a = int(input())
#b = list(map(int, input().split()))
a, p = map(int, input().split())
#s = input()
#s,t = input().split()
#a = [int(input()) for _ in range(n)]
#
#readline = sys.stdin.readline
#n,m = [int(i) for i in readline().split()]
#ab = [[int(i) for i in readline().split()] for _ in range(n)]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

A, P = map(int, input().split())
ans = math.floor((3 * A + 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:
inp=input()
list=inp.split()
a, p=list[0], list[1]
print(int(((int(a)*3)+int(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:
# coding: utf-8
# Your code here!
a,p=input().split()
a=int(a)
p=int(p)
x=(a*3)
print((p+x)//2)

Submission status: Accepted

Solution code:
# 128 A

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

Submission status: Accepted

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

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

A, P = MI()

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

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
# 初期入力
import sys
input = sys.stdin.readline
A,P = (int(i) for i in input().split())
ans =(A*3 +P )//2
print(ans)

Submission status: Accepted

Solution code:
import sys
a=sys.stdin.readline()
res = [int(i) for i in a.split() if i.isdigit()] 
A,P = [res[i] for i in (0,1)]
if type(A)==int and type(P)==int and (A>=0 and A<=100) and (P>=0 and P<=100):
    Pieces=P+(A*3)
    Pies=Pieces//2
    print(Pies)
else:
    print("Error")

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

p += a*3

print(p // 2)

Submission status: Accepted

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

Submission status: Accepted

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

print((x*3+y)//2)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

x = A*3 + P

print(x//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())
P = P + A * 3
print(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:
# coding: utf-8
# Your code here!
A,P=map(int, input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

A, P = map(int, sys.stdin.readline().strip().split())
print((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())

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

Submission status: Accepted

Solution code:
import sys

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


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


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit


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


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

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, raw_input().split(' '))
print (3*a + b)/2

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
p=a*3+b
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:
def main():
    a, p = map(int, input().split())
    ap = a * 3 + p 
    pp = ap // 2
    print(pp)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

a *= 3

ans = (a+p)/2

print(int(ans))

Submission status: Accepted

Solution code:
import math
def ip():return int(input())
def inp():return map(int,input().split())
def linp():return list(map(int,input().split()))

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

Submission status: Accepted

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


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


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


from collections import defaultdict, deque
from sys import exit
import math
import copy
from bisect import bisect_left, bisect_right
from heapq import *
import sys

# sys.setrecursionlimit(1000000)
INF = 10 ** 17
MOD = 1000000007

from fractions import *


def inverse(f):
    # return Fraction(f.denominator,f.numerator)
    return 1 / f


def combmod(n, k, mod=MOD):
    ret = 1
    for i in range(n - k + 1, n + 1):
        ret *= i
        ret %= mod

    for i in range(1, k + 1):
        ret *= pow(i, mod - 2, mod)
        ret %= mod

    return ret


def bunsu(n):
    ret = []
    for i in range(2, int(math.sqrt(n)) + 1):
        if n % i == 0:
            tmp = 0
            while (True):
                if n % i == 0:
                    tmp += 1
                    n //= i
                else:
                    break
            ret.append((i, tmp))

    ret.append((n, 1))
    return ret

MOD = 998244353
def solve():
    n, m = getList()
    print((n * 3 + m) // 2)

def main():
    n = getN()
    for _ in range(n):
        solve()


if __name__ == "__main__":
    solve()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
a,p = readInts()
print((a*3 + p)//2)

Submission status: Accepted

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

X=A*3+P

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

Submission status: Accepted

Solution code:
a,p = map(int,input().split())
ans = int((a*3+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:
import sys
input = lambda : sys.stdin.readline().rstrip()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
A, P = map(int, input().split())
pie = 0.5 * (P + 3 * A)
realPie = math.floor(pie)
print(realPie)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
from copy import deepcopy
alf = list("abcdefghijklmnopqrstuvwxyz")
ALF = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
#import numpy as np
INF = float("inf")
#d = defaultdict(int)
#d = defaultdict(list)
#N = int(input())
#A = list(map(int,input().split()))
#S = list(input())[:-1]
#S.remove("\n")
#N,M = map(int,input().split())
#S,T = map(str,input().split())
#A = [int(input()) for _ in range(N)]
#S = [list(input())[:-1] for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
A,P = map(int,input().split())
num = 3*A+P
ans = num // 2
print(ans)