#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <iostream>
#include <map>

#define P 998244353

using namespace std;

typedef long long ll;

map <ll, ll> F[2];

string operator & (string X, string Y) {
    string Z;
    for(int i = 0; i < X.size(); i++) Z += char('0' + ((X[i] - '0') & (Y[i] - '0')));
    return Z;
}

ll gethsh(string A) {
    ll ans = 0;
    for(int i = 0; i < A.size(); i++) ans = (ans * 131 + A[i]);
    return ans;
}

ll Solve(string A, int op) {
    ll ans = 0;
    if(ans = F[op][gethsh(A)]) return ans;
    if(op == 1) {
        ll ans = 0;
        for(int i = 1; i <= A.size(); i++) ans = (ans + Solve(A.substr(0, i), 0) * Solve(A.substr(i, A.size() - i), 1)) % P;
        return F[op][gethsh(A)] = ans;
    }
    for(int i = 1; i < A.size(); i++) if(A.size() % i == 0) {
        string X = A.substr(0, i);
        for(int j = i; j < A.size(); j += i) X = X & A.substr(j, i);
        ans = (ans + Solve(X, 1)) % P;
    }
    return F[op][gethsh(A)] = ans;
}

int main() {
    string A;
    F[1][gethsh("")] = 1;
    F[0][gethsh("0")] = 1;
    F[0][gethsh("1")] = 2;
    cin >> A;
    printf("%lld\n", Solve(A, 1));
    return 0;
}