import numpy as np
import matplotlib.pyplot as plt

def main():
	print('Input A')
	a = int(input())
	print('Input P')
	p = int(input())

	tips = a * 3 + p
	pie = int(tips / 2)

	print("output\n"+str(pie))


if __name__ == '__main__':
	main()