def func(st): global num for i in range(1,len(st)//2+1): if(st[:i] == st[-i:]): num+=1 func(st[i:-i]) num = 1 func(input()) print(num%1000000007)