Problem: Hongcow is learning to spell! One day, his teacher gives him a word that he needs to learn to spell. Being a dutiful student, he immediately learns how to spell the word.

Hongcow has decided to try to make new words from this one. He starts by taking the word he just learned how to spell, and moves the last character of the word to the beginning of the word. He calls this a cyclic shift. He can apply cyclic shift many times. For example, consecutively applying cyclic shift operation to the word "abracadabra" Hongcow will get words "aabracadabr", "raabracadab" and so on.

Hongcow is now wondering how many distinct words he can generate by doing the cyclic shift arbitrarily many times. The initial string is also counted.

Input

The first line of input will be a single string s (1 ≤ |s| ≤ 50), the word Hongcow initially learns how to spell. The string s consists only of lowercase English letters ('a'–'z').

Output

Output a single integer equal to the number of distinct strings that Hongcow can obtain by applying the cyclic shift arbitrarily many times to the given string.

Examples

Input

abcd


Output

4


Input

bbb


Output

1


Input

yzyz


Output

2

Note

For the first sample, the strings Hongcow can generate are "abcd", "dabc", "cdab", and "bcda".

For the second sample, no matter how many times Hongcow does the cyclic shift, Hongcow can only generate "bbb".

For the third sample, the two strings Hongcow can generate are "yzyz" and "zyzy".

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
bool isVowel(char x) {
  if (x == 'u' || x == 'e' || x == 'o' || x == 'a' || x == 'i') {
    return true;
  } else
    return false;
}
bool gcd(long long int a, long long int b) {
  if (a % b == 0)
    return b;
  else
    return gcd(b % a, a);
}
bool isPrime(long long int n) {
  for (int i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) return false;
  }
  return true;
}
long long int Euclid(long long int a, long long int b, long long int &x,
                     long long int &y) {
  if (b == 0) {
    x = 1;
    y = 0;
    return a;
  }
  long long int x1, y1;
  long long int gcd = Euclid(b, a % b, x1, y1);
  x = y1;
  y = x1 - (a / b) * y1;
  return gcd;
}
long long int modInverse(long long int b, long long int m) {
  long long int x, y;
  long long int g = Euclid(b, m, x, y);
  if (g != 1) return -1;
  return (x % m + m) % m;
}
long long int modDivice(long long int a, long long int b, long long int m) {
  a %= m;
  long long int inv = modInverse(b, m);
  if (inv == -1) return -1;
  return (inv * a) % m;
}
long long int pow(long long int a, long long int n) {
  if (n == 0) return 1;
  if (n == 1) return a;
  long long int t = pow(a, n / 2);
  t *= t;
  if (n % 2) t = t * a;
  return t;
}
long long int powMod(long long int a, long long int n, long long int m) {
  if (n == 0) return 1 % m;
  if (n == 1) return a % m;
  long long int t = powMod(a, n / 2, m) % m;
  t = (t * t) % m;
  if (n % 2) t = (t * a) % m;
  return t % m;
}
long long int powMod2(long long int a, long long int n, long long int m) {
  long long int res = 1;
  for (long long int i = n; i; i >>= 1) {
    if (i & 1) res = (res * a) % m;
    a = (a * a) % m;
  }
  return res;
}
long long int phiEuler(long long int n) {
  long long int res = n;
  for (long long int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      while (n % i == 0) n /= i;
      res -= (res / i);
    }
  }
  if (n != 1) res -= (res / n);
  return res;
}
void BornPhi(long long int n) {
  long long int phi[n + 1];
  for (long long int i = 1; i <= n; i++) {
    phi[i] = i;
  }
  for (long long int p = 2; p <= n; p++) {
    if (phi[p] == p) {
      phi[p] = p - 1;
      for (long long int i = 2 * p; i <= n; i += p) {
        phi[i] = (phi[i] / p) * (p - 1);
      }
    }
  }
}
long double C(long long int n, long long int k) {
  long double res = 1;
  if (k > n - k) k = n - k;
  for (long long int i = 0; i < k; i++) {
    res *= (n - i);
    res /= (i + 1);
  }
  return res;
}
bool isPara(string s) {
  for (int i = 0; i < s.length(); i++) {
    if (s[i] != s[s.length() - 1 - i]) return false;
  }
  return true;
}
string s;
set<string> a;
int main() {
  cin >> s;
  a.insert(s);
  long long int tmp = s.length() - 1;
  while (tmp-- > 0) {
    char x = s[s.length() - 1];
    s.erase(s.length() - 1, 1);
    s = x + s;
    a.insert(s);
  }
  cout << a.size();
  return 0;
}