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

const int MAXN = 105, mod = 998244353;

char str[MAXN];

int n;

unordered_map<string, int> dp;

vector<int> v[MAXN];

int dfs(const string &str)
{
	if (str.length() == 0) return 1;
	if (str.length() == 1) return str[0]-'0'+1;
	if (dp.count(str)) return dp[str];
	dp[str] = 0;
	int len = str.length(), ans = dfs(str.substr(1, len-1))*(str[0]-'0'+1)%mod;
	string tmp;
	for (register int i = 1; i <= len; i++) {
		for (auto j : v[i]) {
			tmp = "";
			for (register int k = 0; k < j; k++) {
				char cur = 1;
				for (register int w = 0; w < i; w += j)
					cur &= (str[w+k]-'0');
				tmp += cur+'0';
			}
			ans = (ans+(long long)dfs(tmp)*(i == len ? 1 : dfs(str.substr(i, len-i)))) % mod;
		}
	}
	return dp[str] = ans;
}

int main()
{
	string str;
	cin >> str;
	n = str.length();
	for (int i = 1; i <= n; i++)
		for (int j = i*2; j <= n; j += i)
			v[j].push_back(i);
	cout << dfs(str) << endl;
        return 0;
}
