#include <bits/stdc++.h>

using namespace std;

const int mod = 998244353;

map<string,int> f1,f2;

string s;

int solv(string s);

int solv2(string s)
{
	if(!s.size()) return 1;
	if(s.size() == 1) return s[0] == '1' ? 2 : 1;
	if(f2.find(s) != f2.end()) return f2[s];
	int as = 0;
	for(int i = 1;i * 2 <= s.size(); ++ i)
	{
		if(s.size() % i == 0)
		{
			string t = "";
			for(int j = 0;j < i; ++ j)
			{
				bool flg = 1;
				for(int k = j;k < s.size();k += i)
					if(s[k] == '0')
					{
						flg = 0;
						break;
					}
				t += flg ? "1" : "0";
			}
			as += solv(t);
			as %= mod;
		}
	}
	return f2[s] = as;
}

int solv(string s)
{
	if(!s.size()) return 1;
	if(s.size() == 1) return s[0] == '1' ? 2 : 1;
	if(f1.find(s) != f1.end()) return f1[s];
	int as = 0;
	for(int i = 1;i <= s.size(); ++ i)
	{
		as += solv2(s.substr(0,i)) * 1ll * solv(s.substr(i,s.size())) % mod;
		as %= mod;
	}
	return f1[s] = as;
}

int main()
{
	cin >> s;
	printf("%d\n",solv(s));
	return 0;
}