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 isPrime(long long n) {
  if (n <= 1) return false;
  for (long long i = 2; i < n; i++)
    if (n % i == 0) return false;
  return true;
}
long long SieveOfEratosthenes(long long n, long long a) {
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  for (long long p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (long long i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (long long p = 2; p <= n; p++)
    if (prime[p]) {
      if (a % p == 0) {
        return (a - p);
      }
    }
}
long long nCr(int n, int r) {
  if (r > n - r) r = n - r;
  long long ans = 1;
  int i;
  for (i = 1; i <= r; i++) {
    ans *= n - r + i;
    ans /= i;
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long a, b, c, d, e, g, h, n, t, f, k, l, m,
      f1 = 0, flag = 0, flag1 = 0, co = 0, co1 = 0, co2 = 0, arr[100001] = {0},
      arr1[100001] = {0}, sum = 0, sum1 = 0, ma = 0, ma1 = 0,
      mi = 1000000000000000001;
  long long co3 = 0, co4 = 0, co5 = 0, co6 = 0, co7 = 0, co8 = 0, mul = 1,
            sum2 = 0, sum3 = 0;
  long long MOD = 1e9 + 7;
  double pi = 2 * acos(0.0);
  string str, str1, str2, str3;
  char ch, ch1;
  vector<long long> v;
  vector<long long> v1;
  vector<string> vs;
  vector<string> vs1;
  vector<char> vc;
  map<long long, long long> mp;
  map<char, int> mp1;
  set<string> s;
  set<long long> s1;
  list<char> li;
  list<char>::iterator it;
  queue<long long> q;
  stack<long long> stk;
  vector<pair<long long, long long> > v3;
  int x[] = {1, 1, 1, 0, 0, -1, -1, -1};
  int y[] = {0, 1, -1, 1, -1, 1, -1, 0};
  cin >> str;
  s.insert(str);
  for (int i = 0; i < str.size(); i++) {
    li.push_back(str[i]);
  }
  for (int i = 0; i < str.size(); i++) {
    str1.clear();
    ch = li.back();
    li.push_front(ch);
    li.pop_back();
    for (it = li.begin(); it != li.end(); it++) {
      str1.push_back(*it);
    }
    s.insert(str1);
  }
  cout << s.size() << endl;
  return 0;
}