while True: x=int(input()) print(int([1for j in range(1,10)if x%j==0and x//j<10]!=[]))