#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <cstring>
#include <queue>
#include <ctime>
#include <cassert>
#include <cstdio>
#include <algorithm>
#include <unordered_set>
#include <unordered_map>
#include <bitset>
#include <random>
#include <functional>

using namespace std;

#define F first
#define S second
#define pb push_back
#define epr(...) fprintf(stderr, __VA_ARGS__)
#define db(x) cerr << #x << " = " << x << endl
#define db2(x, y) cerr << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")\n"; 
#define db3(x, y, z) cerr << "(" << #x << ", " << #y << ", " << #z << ") = (" << x << ", " << y << ", " << z << ")\n"
#define dbv(a) cerr << #a << ": "; for (auto& xxxx: a) cerr << xxxx << " "; cerr << endl;
#define forn(i, n) for (int i = 0; i < (int)(n); i++)
#define all(a) (a).begin(), (a).end()
#define sz(a) (int)a.size()
#define pw(n) (1ll << (n))
#define equal equalll
#define less lesss

typedef double dbl;
typedef long long ll;
const int N = -1;
const int INF = 1.01e9;
typedef vector<int> vi;
const int MOD = 998244353;
const int P = 191819;
const int MEGA_MOD = 1023914923;

void add(ll& a, ll b) {
    assert(b >= 0);
    a = (a + b) % MOD;
}



map<ll,ll> dp;
map<ll,ll> dpnr;

ll getHash(const string& s) {
    ll res = 0;
    for (auto ch: s) {
        res = (res * P + ch) % MEGA_MOD;
    }
    return res;
}

ll rec(const string& s);

ll notCon(const string& s) {
    ll hash = getHash(s);
    auto it = dpnr.find(hash);
    if (it == dpnr.end()) {
        ll val = 0;
        if (s.size() == 1) {
            val = s[0] - '0' + 1;
        } 
        else {
            ll rep = 0;
            for (int repLen = 1; repLen < sz(s); repLen++) {
                if (s.size() % repLen == 0) {
                    //assert(repLen < 60);
                    //ll mask = pw(repLen) - 1;
                    string tmp(repLen, '1');
                    for (int j = 0; j < sz(s); j++) {
                        if (s[j] == '0') {
                            int pos = j % repLen;
                            tmp[pos] = '0';
                            //mask = mask ^ (((mask >> pos) & 1ll) << pos);
                        }
                    }
                    //ll localComb = 1;
                    //for (int j = 0; j < repLen; j++) {
                        //if (mask & pw(j)) {
                            ////localComb = (localComb * 2) % MOD;
                            //tmp += "1";
                        //}
                        //else {
                            //tmp += "0";
                        //}
                    //}
                    add(rep, rec(tmp));
                }
            }
            val = rep;
        }
        dpnr[hash] = val;
        return val;
    }
    else {
        return it->S;
    }
}

ll rec(const string& s) {
    ll hash = getHash(s);
    auto it = dp.find(hash);
    if (it == dp.end()) {
        ll val = notCon(s);
        //db2(s, val);
        for (int lenL = 1; lenL < sz(s); lenL++) {
            //db2(val, lenL);
            add(val, notCon(s.substr(0, lenL)) * rec(s.substr(lenL, s.size() - lenL)));
        }
        dp[hash] = val;
        return val;
    }
    else {
        return it->S;
    }
    
}


int main() {
#ifdef HOME 
    assert(freopen("in", "r", stdin));
    //freopen("test.txt", "r", stdin);
#endif
    string s;
    cin >> s;   
    //cerr << notCon("11") << endl;
    //cerr << rec("11") << endl;
    //db(rec("11"));
    //db(rec("10"));
    cout << rec(s) << endl;
    


   






#ifdef HOME 
    epr("time = %d ms\n", (int)(clock() * 1000. / CLOCKS_PER_SEC));
#endif
    return 0;
}


Measured memory_bytes: 6784