s = input() p = 10**9+7 m = 2**64 h, w = [0], [1] for c in s: h.append((h[-1]*p+ord(c))%m) w.append(w[-1]*p%m) def H(i, j): return (h[j]-h[i]*w[j-i])%m n = len(s)//2+1 dp = [1]*n for i in range(n)[::-1]: for j in range(i+1, n): if H(i, j) == H(len(s)-j, len(s)-i): dp[i] += dp[j] print(dp[0]%p)