#include<bits/stdc++.h>
using namespace std;
const int mo=998244353;
map<string,int> dp;
string s;
int calc(string s){
  	if (dp.find(s)!=dp.end()) return dp[s];
   	int n=s.size(),f[105],i,j,k,l;
   	string subs,pres=s; s="0"+s;
   	for (i=f[0]=1;i<=n;i++){
   		f[i]=1ll*f[i-1]*(s[i]-'0'+1)%mo;
   		for (j=1;j*2<=i;j++){
   			subs.clear();
   			for (k=1;k<=j;k++) subs+=s[i-j+k];
   			for (k=2;j*k<=i;k++){
   				for (l=1;l<=j;l++)
   					if (s[i-j*k+l]=='0') subs[l-1]='0';
   					f[i]=(f[i]+1ll*f[i-j*k]*calc(subs))%mo;
   			}
   		}
   	}
   	return dp[pres]=f[n];
}
int main(){
   	cin>>s;
   	dp["0"]=1; dp["1"]=2;
   	printf("%d\n",calc(s));
}