#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
const int N = 105;
int cnt, n;
#define B __int128
map <__int128, int> F[N];
__int128 S;
int solve(B x, int n) {
    if (F[n].count(x)) return F[n][x];
    int d = 1, res = 0;
    for (int l = 0; l < n; ++ l) {
        for (int s = 1; l + s * 2 - 1 < n; ++ s) {
            B y = (x >> l) & ((((B)1) << s) - 1);
            for (int c = 2; l + s * c - 1 < n; ++ c) {
                y &= (x >> (l + s * (c - 1)));
                res = (res + 1ll * solve(y, s) * solve(x >> (l + s * c), n - (l + s * c)) % MOD * d) % MOD;
            }
        }
        if ((x >> l) & 1) d = (d + d) % MOD;
    }
    res = (res + d) % MOD;
    return F[n][x] = res;
}
string st;
int main() {
    cin >> st;
    for (int i = 0; i < st.size(); ++ i)
        S |= ((B)(st[i] - '0')) << i;
    cout << solve(S, st.size()) << endl;
}
