# Problem 29
# consider all integer combinations of a^b for 2 <= a <=5 and 2<=b<=5:
# if we place them in numerical order and any repeats removed we get a sequence of 15 distinct terms 
# 
# How many terms are in the sequence generated by a^b for 2<=a <= 100 and 2<-b<-100?



valSet = set()
for a in range(2,101):
    for b in range(2,101):
        valSet.add(a**b)

print(len(valSet))