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

const int mod=998244353;
const int maxn=105;
char ch[maxn];
map<pair<unsigned long long,unsigned long long>,int>F;

int f(string s){
	if(s.empty())return 1;
	if(int(s.size())==1)return s[0]-'0'+1;
	int len=int(s.size());
	unsigned long long m1=(len<64)?(1uLL<<len):0;
	unsigned long long m2=(len>=64)?(1uLL<<(len-64)):0;
	for(int i=0;i<int(s.size());i++)if(s[i]=='1'){
		if(i<64)m1|=(1uLL<<i);
		else m2|=(1uLL<<(i-64));
	}
	if(F.count(make_pair(m1,m2)))return F[make_pair(m1,m2)];
	int ans=1LL*(s[0]-'0'+1)*f(s.substr(1))%mod;
	for(int i=1;i<=len;i++){
		string t=s.substr(0,i);
		for(int j=2;j<=len/i;j++){
			for(int k=0;k<i;k++)if(t[k]=='1'&&s[(j-1)*i+k]=='0')
				t[k]='0';
			ans=(ans+1LL*f(t)*f(s.substr(j*i)))%mod;
		}
	}
	return F[make_pair(m1,m2)]=ans;
}

int main(){
	scanf("%s",ch);string s=ch;
	printf("%d\n",f(s));
	return 0;
}