from math import factorial
def fact(a):
return factorial(a)
def root(a):
return a ** (1/2)
def square(a):
return a ** 2
def cube(a):
return a ** 3
commands = [
{'match':'root', 'func': root },
{'match':'!', 'func': fact },
{'match':'²', 'func': square },
{'match':'³', 'func': cube },
]
input_command = input()
for command in commands:
if command["match"] in input_command:
val = int(input_command.strip(command["match"]))
print(command["func"](val))
break
ZnJvbSBtYXRoIGltcG9ydCBmYWN0b3JpYWwKCgpkZWYgZmFjdChhKToKICAgIHJldHVybiBmYWN0b3JpYWwoYSkKCgpkZWYgcm9vdChhKToKICAgIHJldHVybiBhICoqICgxLzIpCgoKZGVmIHNxdWFyZShhKToKICAgIHJldHVybiBhICoqIDIKCgpkZWYgY3ViZShhKToKICAgIHJldHVybiBhICoqIDMKCgpjb21tYW5kcyA9IFsKICAgIHsnbWF0Y2gnOidyb290JywgJ2Z1bmMnOiByb290IH0sCiAgICB7J21hdGNoJzonIScsICAgICdmdW5jJzogZmFjdCB9LAogICAgeydtYXRjaCc6J8KyJywgICAgJ2Z1bmMnOiBzcXVhcmUgfSwKICAgIHsnbWF0Y2gnOifCsycsICAgICdmdW5jJzogY3ViZSB9LApdCgppbnB1dF9jb21tYW5kID0gaW5wdXQoKQoKZm9yIGNvbW1hbmQgaW4gY29tbWFuZHM6CiAgICBpZiBjb21tYW5kWyJtYXRjaCJdIGluIGlucHV0X2NvbW1hbmQ6CiAgICAgICAgdmFsID0gaW50KGlucHV0X2NvbW1hbmQuc3RyaXAoY29tbWFuZFsibWF0Y2giXSkpCiAgICAgICAgcHJpbnQoY29tbWFuZFsiZnVuYyJdKHZhbCkpCiAgICAgICAgYnJlYWsgCg==