A = gets.to_i B = gets.to_i if A == 0 && B == 0 puts 0 else puts A ** B end