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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()
from collections import defaultdict

a, i = LI()
print(int((a * 3 + i) / 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())
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:
# A - Apple Pie
# https://atcoder.jp/contests/abc128/tasks/abc128_a

a, p = list(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 solve():
    A, P = [int(_) for _ in raw_input().split()]
    ret = (A * 3 + P) /2
    print ret

if __name__ == '__main__':
    solve()

Submission status: Accepted

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

ans = (A*3 + P)/2

print(int(ans))

Submission status: Accepted

Solution code:
import sys
from collections import deque
import copy
import math
def get_read_func(fileobject):
    if fileobject == None :
        return raw_input
    else:
        return fileobject.readline



def main():
    if len(sys.argv) > 1:
        f = open(sys.argv[1])
    else:
        f = None
    read_func = get_read_func(f);
    input_raw = read_func().strip().split()
    [A, P] = [int(input_raw[0]), int(input_raw[1])]
    print ((A*3) + P)/2
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# abcde	s=input()	s='abcde'
# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e']
# 5(1つだけ)	a=int(input())	a=5
# 1 2	| x,y = s_inpl()   |	x=1,y=2
# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n']
# 1 2 3 4 5 ... n 　	li = inpl()	li=[1,2,3,4,5,...,n]
# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF']

# INPUT
# 3
# hoge
# foo
# bar
# ANSWER
# n=int(input())
# string_list=[input() for i in range(n)]

import math
import copy
from collections import defaultdict
from collections import Counter
from collections import deque
# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B)
from itertools import product
# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n)
from itertools import permutations
# 組み合わせ {}_len(seq) C_n: combinations(seq, n)
from itertools import combinations
from bisect import bisect_left, bisect_right
# import numpy as np

def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W

# 四方向: 右, 下, 左, 上
dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]

def i_inpl(): return int(input())
def s_inpl(): return map(int,input().split())
def l_inpl(): return list(map(int, input().split()))
INF = float("inf")

############
############
############

A, P = l_inpl()

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys,heapq
from collections import deque,defaultdict
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True # and False
def ddprint(x):
  if DBG:
    print(x)

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

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 = (int(x) for x in input().split())
ans = (p+a*3) /2
print(int(ans))

Submission status: Accepted

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

p = P + A*3

print(int(p/2))

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print((((num1*3)+num2)//2))

Submission status: Accepted

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

Submission status: Accepted

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

inputs = input().split(' ')
A = int(inputs[0])
P = int(inputs[1])

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

# bc_mat = np.zeros((m, 2))
# for i in range(m):
#     bc_mat[i, :] = list(map(int, input().split()))


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

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

print(max_pie)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


def solv(a, p):
    return (a*3+p) // 2


if __name__ == '__main__':

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

    ans = solv(a, p)

    print(ans)

Submission status: Accepted

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

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().split()]
print((3 * A + 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())

aaa = a*3+p

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

Submission status: Accepted

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

N = A * 3 + P

print(int(N/2))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

print(rtn)

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().rstrip().split())
n = A*3 + P
print(n//2)

Submission status: Accepted

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

parts = A * 3 + P

print(parts // 2)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import sys
range = xrange
input = raw_input

a,p = [int(x) for x in input().split()]

p += 3*a

print p//2

Submission status: Accepted

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

Submission status: Accepted

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


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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import Counter
from collections import deque
from functools import reduce
from pprint import pprint
# import statistics
import bisect
import copy
import fractions
import math
import random
import sys
import time
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def MI(): return map(int, sys.stdin.readline().split())
def II(): return int(sys.stdin.readline())
def IS(): return input()
def C(x): return Counter(x)
def GCD_LIST(numbers): return reduce(fractions.gcd, numbers)
def LCM_LIST(numbers): return reduce(LCM, numbers)
def LCM(m, n): return (m * n // fractions.gcd(m, n))
def unite(x, y):
    # それぞれのノードの根を求める
    x = root(x)
    y = root(y)
    if x == y:
        return
    # node[x]の根をyに変更する
    node[x] = y
def same(x,y): return bool(root(x) == root(y))
def root(x):
    if node[x] == x:  # xが根の場合
        return x
    else:
        node[x] = root(node[x])  # 経路圧縮
        return node[x]
def dfs(v):
    # ノードに訪れた
    visited[v] = True
    for v2 in range(n):
        if graph[v][v2] == False:  # そもそもvとv2が辺でつながっていない
            continue
        if visited[v2] == True:  # もう見た
            continue
        dfs(v2)


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

Submission status: Accepted

Solution code:
from sys import stdin

a, p = [int(x) for x in stdin.readline().rstrip().split()]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
A,P = [int(i) for i in input().split()]
n= 3*A + P
print(n//2)

Submission status: Accepted

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

kudaku = a*3 + p

print(int(kudaku/2))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

P = A * 3 + P

print(P//2)

Submission status: Accepted

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

Submission status: Accepted

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

print(applepie)

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())
ans = int((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:
import fractions
import numpy as np
import os
import sys

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

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

Submission status: Accepted

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

sum_ = a*3+p 

print(sum_//2)

Submission status: Accepted

Solution code:
import sys
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def II(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def SI(): return input()
YN = lambda b: print('YES') if b else print('NO')
yn = lambda b: print('Yes') if b else print('No')

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

main()

Submission status: Accepted

Solution code:
import math
a, p = map(int, raw_input().split(" "))

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

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:
# -*- coding: utf-8 -*-
"""
AtCoder A
"""
import math
# N = int(input())
# A = list(map(int,input().split())) # N row 1 column
# A = [int(input()) for _ in range(N)] # 1 row N column

# S = str(input()) # str(input()) == input() -> 'abc'
# S = list(input()) # abc -> ['a','b','c']

def main():
    # N = int(input())
    A, B = list(map(int,input().split()))
    print(math.floor((A*3+B)/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())
ans = (A*3+P)//2
print(ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun May 26 20:54:59 2019

@author: Yamazaki Kenichi
"""

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque, OrderedDict
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from math import ceil, floor
from sys import setrecursionlimit

import heapq as hq
import itertools as its
import operator as op


# globals
inf = float('inf')
N = 0


def set_inputs():
    global N
    return


def main():
    setrecursionlimit(100000)
    set_inputs()
    # ----------MAIN----------
    a, p = get_li()
    print((a * 3 + p) // 2)
    return


def get_int():
    return int(input())


def get_float():
    return float(input())


def get_str():
    return input().strip()


def get_li():
    return [int(i) for i in input().split()]


def get_lf():
    return [float(f) for f in input().split()]


def get_lc():
    return list(input().strip())


def get_data(n, types, sep=None):
    if len(types) == 1:
        return [types[0](input().strip()) for _ in range(n)]
    return list(zip(*(
        [t(x) for t, x in zip(types, input().strip().split(sep=sep))]
        for _ in range(n)
    )))


if __name__ == '__main__':
    main()

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

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

kakera = 3 * A + P

print(kakera // 2)

Submission status: Accepted

Solution code:
#coding:utf-8

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# from sys import exit
A, P = [int(n) for n in input().split()]
# N = int(input())
# a = [int(input()) for _ in range(N)]
# S = str(input())
# L = len(S)
# T = str(input())
# exit()
print((A*3 + P)//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpl_str(): return list(input().split())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
# -*- coding: utf-8 -*-
"""



"""
import sys


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


def main(args):
    A, P = map(int, input().split())
    ans = solve(A, P)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

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

Submission status: Accepted

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

ans = 3 * a + p

ans = ans // 2

print(ans)

Submission status: Accepted

Solution code:
from sys import stdin
input = stdin.readline

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve(a, p):
    p += a*3
    return p//2

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

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().split()]


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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

parts += apple * 3
ans = parts // 2

print(ans)

Submission status: Accepted

Solution code:
import math
(A,P) = list(map(int,input().split()))
P = P + 3*A
print(math.floor(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= (int(i) for i in input().split())

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

print(ans)

Submission status: Accepted

Solution code:
import numpy as np
words = lambda t : list(map(t, input().split()))
a,p = words(int)

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import sys
if sys.version_info[0] == 2:
    input = raw_input
sys.setrecursionlimit(2 ** 31 -1)

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

Submission status: Accepted

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

def f(A, P):
    return (3*A + P)//2


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys

def intinput(): return map(int,sys.stdin.readline().split())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)


def read_int():
    return int(input())


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


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(A, P):
    return ((A*3)+P) // 2


def main():
    A, P = read_int_n()
    print(slv(A, P))


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, M = map(int, input().split()) #2 args input

print((M+N*3)//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#a, b, c, d = (int(i) for i in input().split())  

#a = [int(i) for i in input().split()] 

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

Submission status: Accepted

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

peace = 3 * A + P
pie = peace // 2

print(pie)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

tmp = a*3 + p

print(tmp//2)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
input = sys.stdin.readline
 
# bisect_left(lists, 3)
# bisect_right(lists, 3)

# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

def main():
	A, P = map(int, input().split(" "))
	#N = int(input())
	#S = input()

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

	


if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:

if __name__ == '__main__':
    a,p = list(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())
print(int((a * 3 + p ) / 2))

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)

N,M = map(int,input().split())
print((3*N + M)//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import deque
from collections import defaultdict
import math
sys.setrecursionlimit(20000000)
#input = sys.stdin.readline
a,p = map(int,input().split())
print((a*3+p)//2)

Submission status: Accepted

Solution code:
def read():
    A, P = list(map(int, input().strip().split()))
    return A, P


def solve(A, P):
    kakera = A * 3 + P
    pie = kakera // 2
    return pie


if __name__ == '__main__':
    inputs = read()
    print("%d" % solve(*inputs))

Submission status: Accepted

Solution code:


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

    p += a * 3

    print(p // 2)



if __name__ == '__main__':
    submit()

Submission status: Accepted

Solution code:
from sys import stdin
import numpy as np
# import math
# import random
# import fractions
# import sys
# sys.setrecursionlimit(100000)
# N = int(stdin.readline().rstrip().split()[0])
# A = [int(x) for x in stdin.readline().rstrip().split()]
# N, X = [int(x) for x in stdin.readline().rstrip().split()]
# S = stdin.readline().rstrip().split()[0]
A, P = [int(x) for x in stdin.readline().rstrip().split()]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

piece=a*3+p
if piece%2==1:
    pie=int((piece-1)/2)
else:
    pie=int(piece/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:
def main():
    A, P = map(int, input().split())
    print((3 * A + P) // 2)

main()

Submission status: Accepted

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

P += A * 3

pie = P // 2

print(pie)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!venv/bin/python
 
import math
import numpy as np
import random
import copy
import statistics 
import bisect
import heapq
from collections import defaultdict 

import random #入力整数列Aの生成に使用

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

import math

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

s = a*3+p

print(s//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

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

Submission status: Accepted

Solution code:
import sys
import os


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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())  # 複数数値入力
print(int((a*3+b)/2))

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

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

Submission status: Accepted

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



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

Submission status: Accepted

Solution code:
import math
 
n,m = list(map(int, input().split()))

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