import math a,b = int(input()),int(input()) print(math.floor(math.pow(b,1/a)+0.000000000001)) #以我目前的知识水平只是想到这个代码