#  How many distinct terms are in the sequence generated by a^b for 2 ≤ a ≤  100 and 2 ≤ b ≤ 100?

array =  []
for a in range(2,101):
    for b in range(2,101):
        if(pow(a,b) in array):
            continue
        else:
            array.append(pow(a,b))
print(len(array))
