#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <map>
#include <iostream>
#define p 998244353
using namespace std;

string s;
map<string,int> dp;

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(f[0]=i=1;i<=n;++i)
	{
		f[i]=f[i-1]*(s[i]-'0'+1)%p;
		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]+(long long)f[i-j*k]*calc(subs))%p;
			}
		}
	}
	dp[pres]=f[n];
	return f[n];
}

int main()
{
	cin >> s;
	dp["0"]=1;dp["1"]=2;
	printf("%d\n",calc(s));
}