from sys import set_int_max_str_digits set_int_max_str_digits(0) a = int(input()) b = int(input()) print(round(b**(1/a)))