#include <bits/stdc++.h>
using namespace std;
string s;
vector<unsigned int> dig, a, b;
void Start() {
  dig.push_back(1);
  for (int i = 1; i < (s.size() + 1); i++) dig.push_back(dig[i - 1] * 31);
  a.push_back(s[0]);
  for (int i = 1; i < (s.size()); i++) a.push_back(a[i - 1] + (s[i] * dig[i]));
  reverse(s.begin(), s.end());
  b.push_back(s[0]);
  for (int i = 1; i < (s.size()); i++) b.push_back(b[i - 1] + (s[i] * dig[i]));
}
bool Test(int i, int j) {
  unsigned int tmp1, tmp2;
  tmp1 = a[i] * dig[s.size()];
  tmp2 = b[s.size() - 1];
  if (j) tmp2 -= b[j - 1];
  tmp2 *= dig[s.size() - j];
  return tmp1 == tmp2;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> s;
  Start();
  int ans = 1;
  for (int i = 1; i < (s.size()); i++) {
    int k = 0;
    int ind = i;
    while (Test(ind, s.size() - ind - 1) && ind) {
      k++;
      ind = (ind - 1) / 2;
    }
    if (ind == 0) k++;
    ans += k;
  }
  cout << ans << endl;
}
