#include<bits/stdc++.h>
using namespace std;
using ll=long long;
#define fr(i,n) for(int i=0;i<(n);++i)
#define Fr(i,n) for(int i=1;i<=(n);++i)
#define ifr(i,n) for(int i=(n)-1;i>=0;--i)
#define iFr(i,n) for(int i=(n);i>0;--i)

struct modint{
    using i64=int_fast64_t;
    i64 a;
    static constexpr i64 MOD=998244353;
    modint(){a=0;}
    modint(i64 a_){
        a=a_%MOD;
        if(a<0) a+=MOD;
    }
    modint inv()const{
        i64 n=1,m=MOD-2,A=a;
        while(m){
            if(m&1)(n*=A)%=MOD;
            (A*=A)%=MOD;
            m>>=1;
        }
        modint y(n);
        return y;
    }
    bool operator==(const modint& x){
        return a==x.a;
    }
    bool operator!=(const modint& x){
        return a!=x.a;
    }
    modint& operator=(const modint& x){
        a=x.a;
        return *this;
    }
    modint operator+(const modint& x){
        modint y;
        y.a=a+x.a;
        if(y.a>MOD) y.a-=MOD;
        return y;
    }
    modint operator-(const modint& x){
        modint y;
        y.a=a-x.a;
        if(y.a<0) y.a+=MOD;
        return y;
    }
    modint operator*(const modint& x){
        modint y;
        y.a=(a*x.a)%MOD;
        return y;
    }
    modint operator/(const modint& x){
        modint y;
        y.a=(a*x.inv().a)%MOD;
        return y;
    }
    modint& operator+=(const modint& x){
        a+=x.a;
        if(a>=MOD) a-=MOD;
        return *this;
    }
    modint& operator-=(const modint& x){
        a-=x.a;
        if(a<0) a+=MOD;
        return *this;
    }
    modint& operator*=(const modint& x){
        (a*=x.a)%=MOD;
        return *this;
    }
    modint& operator/=(const modint& x){
        (a*=x.inv().a)%=MOD;
        return *this;
    }
};
istream& operator>>(istream &in,modint& x){
    int_fast64_t a_;
    in>>a_;
    modint y(a_);
    x=y;
    return in;
}
ostream& operator<<(ostream &out,const modint& x){
    out<<x.a;
    return out;
}

ostream& operator<<(ostream &out,const vector<bool>& x){
    for(auto f:x) cout<<f<<" ";
    return cout<<endl;
}

vector<modint> p2;

map<vector<bool>,modint> t;
vector<vector<int>> dv;

modint solve(vector<bool>&v){
    int n=v.size();
    if(t.find(v)!=t.end()) return t[v];
    modint ans{};
    if(*v.begin()){
        vector<bool> vv(n-1);
        fr(i,n-1) vv[i]=v[i+1];
        ans+=solve(vv)*2;
    }
    else{
        vector<bool> vv(n-1);
        fr(i,n-1) vv[i]=v[i+1];
        ans+=solve(vv);
    }
    vector<bool> V(0);
    fr(l,n-1){
        vector<bool> vv(l);
        fr(i,l) vv[i]=v[n-l+i];
        modint ka=solve(vv);
        for(auto&i:dv[n-l]){
            V.assign(i,true);
            fr(j,i) fr(k,(n-l)/i) V[j]=V[j]&&v[k*i+j];
            ans+=solve(V)*ka;
        }
    }
    return t[v]=ans;
}

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    istream& in(cin);
    ostream& out(cout);
    p2.resize(101);
    p2[0]=1;
    fr(i,100) p2[i+1]=p2[i]*2;
    dv.resize(101);
    Fr(i,50) for(int j=2*i;j<=100;j+=i) dv[j].emplace_back(i);
    t[{}]=1;
    string s;
    in>>s;
    int n=s.length();
    vector<bool> v(n);
    fr(i,n) v[i]=(s[i]=='1');
    cout<<solve(v)<<endl;
    /*FILE* fp;
    fp=fopen("t.txt","w");
    fr(i,10){
        vector<bool> v(i);
        fr(j,(1<<i)){
            fr(k,i) v[k]=((j>>k)&1);
            fprintf(fp,"t[{");
            fr(k,i){
                fprintf(fp,"%d",(int)v[k]);
                if(k<i-1) fprintf(fp,",");
            }
            fprintf(fp,"}]=%lld;\n",solve(v).a);
            fprintf(fp,"u[{");
            fr(k,i){
                fprintf(fp,"%d",(int)v[k]);
                if(k<i-1) fprintf(fp,",");
            }
            fprintf(fp,"}]=%lld;\n",sub(v).a);
        }
    }*/
}

Measured memory_bytes: 5888