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;
template <class T>
inline T power(T base, int p) {
  T f = 1;
  for (int i = 1; i <= p; i++) f *= base;
  return f;
}
template <typename T>
string NumberToString(T Number) {
  ostringstream ss;
  ss << Number;
  return ss.str();
}
int setbit(int N, int pos) { return N = N | (1 << pos); }
int resetbit(int N, int pos) { return N = N & ~(1 << pos); }
bool checkbit(int N, int pos) { return (bool)(N & (1 << pos)); }
int noofsetbits(int N) { return __builtin_popcount(N); }
long long int bigMod(long long int N, long long int M, long long int MOD) {
  if (M == 0) return 1;
  if ((M / 2) * 2 == M) {
    long long int ret = bigMod(N, M / 2, MOD) % MOD;
    return (ret * ret) % MOD;
  } else
    return ((N % MOD) * bigMod(N, M - 1, MOD) % MOD) % MOD;
}
long long int modInverseBigMod(long long int a, long long int m) {
  return bigMod(a, m - 2, m);
}
pair<int, int> extendedEuclid(long long int a, long long int b) {
  if (b == 0) return pair<int, int>(1, 0);
  pair<int, int> d = extendedEuclid(b, a % b);
  return pair<int, int>(d.second, d.first - d.second * (a / b));
}
long long int modularInverse(long long int a, long long int m) {
  pair<int, int> ret = extendedEuclid(a, m);
  return ((ret.first % m) + m) % m;
}
map<string, bool> mp;
string shift(string s) {
  char lst = s[s.size() - 1];
  for (int i = s.size() - 1; i >= 1; i--) {
    s[i] = s[i - 1];
  }
  s[0] = lst;
  return s;
}
int main() {
  string s;
  while (cin >> s) {
    mp[s] = true;
    int cnt = 1;
    for (int i = 0; i < s.size(); i++) {
      s = shift(s);
      if (!mp[s]) {
        cnt++;
        mp[s] = true;
      }
    }
    mp.clear();
    cout << cnt << endl;
  }
}