#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

const int MOD = 998244353;

map<string, int> dp;

int solve(string s) {
    if (dp.count(s)) return dp[s];
    int ans = 0;
    if (s.empty()) {
        dp[s] = 1;
        return 1;
    }
    if (s[0] == '0') {
        ans = solve(s.substr(1, s.length()));
    } else {
        ans = 2 * solve(s.substr(1, s.length())) % MOD;
    }
    int n = s.length();
    for (int len = 1; len < n; len++) {
        string go = s.substr(0, len);
        for (int iter = 1; iter * len <= n; iter++) {
            string add = s.substr((iter - 1) * len, len);
            for (int k = 0; k < add.size(); k++) {
                if (add[k] == '0') {
                    go[k] = '0';
                }
            }
            if (iter >= 2) {
        //        cerr << go << "  "<< s.substr(iter*len, n) << endl;
                ll godp = 1LL * solve(go) * solve(s.substr(iter * len, n)) % MOD;
                ans = (ans + godp) % MOD;
            }
        }
    }
    dp[s] = ans;
    return ans;
}
int main()
{
#ifdef AZINO777
    freopen("in", "r", stdin);
#endif
    string s;
    cin >> s;
    cout << solve(s) << endl;
    return 0;
}