s = raw_input() count = 1 def look_for_kai(st): global count left = 0 right = len(st) - 1 while (left+1 > right): if(st[:left+1] == st[right:]): count+=1 look_for_kai(st[left+1:right]) left += 1 right -= 1 look_for_kai(s) print count%1000000007