#include <iostream> using namespace std; int main() { string s; while (cin >> s, s != ".") { string t = s + s; int pos = t.find(s, 1); // 寻找第二次出现的位置 cout << s.size() / pos << endl; } return 0; }