import sys
input = sys.stdin.readline

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

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