#include <bits/stdc++.h>
using namespace std;
int BinarySearch(int a, int b, int aa[], int x) {
  while (a <= b) {
    int mid = (a + b) / 2;
    if (aa[mid] == x)
      return mid;
    else if (aa[mid] > x)
      b = mid - 1;
    else
      a = mid + 1;
  }
  return -1;
}
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    gcd(b, a % b);
}
int prime(int x) {
  int sqt = sqrt(x);
  for (int i = 2; i <= sqt; i++) {
    if (x % i == 0) return 0;
  }
  return 1;
}
void swap(char *x, char *y) {
  char temp;
  temp = *x;
  *x = *y;
  *y = temp;
}
int main() {
  int tc;
  string str;
  while (cin >> str) {
    int ll = str.size();
    bool f = false, ff = false;
    int p;
    for (int i = 1; i <= ll / 2 + 1; i++) {
      if (ll % i == 0) {
        f = true;
        for (int k = 1; k <= i; k++) {
          int j = k - 1;
          int m = j + i;
          char ch = str[j];
          for (j = m; j < ll; j += i) {
            if (ch != str[j]) {
              f = false;
              break;
            }
          }
        }
        if (f == true) {
          ff = true;
          p = i;
          break;
        }
      }
    }
    if (ff == true) {
      if (ll == ll / p)
        cout << "1" << endl;
      else
        cout << (p) << endl;
    } else
      cout << ll << endl;
  }
  return 0;
}
