text: # Punto 1
  x = input()
  print 1 - x
  
  # Punto 2
  a = input()
  b = input()
  suma = 0
  for i in range(0,b):
    suma = suma + a
  print suma
  
  # Punto 3
  a = input()
  b = input()
  mult = 1
  for i in range(0,b):
    mult = mult * a
  print mult