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

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

if __name__ == "__main__":
  resolve()
