//problem:
#include <bits/stdc++.h>
using namespace std;

#define pb push_back
#define mk make_pair
#define lob lower_bound
#define upb upper_bound
#define fst first
#define scd second

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;

inline int read(){
	int f=1,x=0;char ch=getchar();
	while(!isdigit(ch)){if(ch=='-')f=-1;ch=getchar();}
	while(isdigit(ch)){x=x*10+ch-'0';ch=getchar();}
	return x*f;
}
inline ll readll(){
	ll f=1,x=0;char ch=getchar();
	while(!isdigit(ch)){if(ch=='-')f=-1;ch=getchar();}
	while(isdigit(ch)){x=x*10+ch-'0';ch=getchar();}
	return x*f;
}

const int MOD=998244353;
map<string,int>f,g;
int F(string s);
int G(string s){
	if(g.count(s))return g[s];
	if((int)s.length()==1)return (g[s]=(s[0]=='0'?1:2));
	for(int i=1;i<(int)s.length();++i)if((int)s.length()%i==0){
		string t="";
		for(int j=0;j<i;++j){
			bool flag=1;
			for(int k=0;k<(int)s.length()/i;++k){
				if(s[i*k+j]=='0'){flag=0;break;}
			}
			if(flag)t+="1";
			else t+="0";
		}
		g[s]=(g[s]+F(t))%MOD;
	}
	return g[s];
}
int F(string s){
	if(f.count(s))return f[s];
	for(int i=1;i<=(int)s.length();++i){
		f[s]=(f[s]+(ll)G(s.substr(0,i))*F(s.substr(i,s.length()-i))%MOD)%MOD;
	}
	return f[s];
}
int main() {
	string s;cin>>s;f[""]=1;cout<<F(s)<<endl;
	return 0;
}