input_lines = gets.chomp
array_num = input_lines.split("\s").map(&:to_i)
apples = array_num[0]
parts = array_num[1]
sum = 0
def make_parts(apples)
  apples * 3
end

sum = parts + make_parts(apples)
def cakes(sum)
  sum / 2
end

puts cakes(sum)
