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

const int mod = 998244353;

string s;
map <string, int> all;

int dfs(string s){
//	cout << "dfs:" << s << endl;
	if (s.length() == 0) return 1;
	if (s.length() == 1) return s[0] - '0' + 1;
	if (all.count(s)) return all[s];
	int n = s.length();
	int res = 1ll * dfs(s.substr(1, n - 1)) * (s[0] - '0' + 1) % mod;
	for (int i = 1; i <= n / 2; i++){
		string tmp = s.substr(0, i);
		for (int j = 2; i * j <= n; j++){
			for (int k = i * (j - 1); k < i * j; k++){
				if (tmp[k - i * (j - 1)] == '0' || s[k] == '0') tmp[k - i * (j - 1)] = '0';
				else tmp[k - i * (j - 1)] = '1';
			}
			res = (res + 1ll * dfs(tmp) * dfs(s.substr(i * j, n - i * j))) % mod;
		}
	}
	return all[s] = res;
}

int main(){
	cin >> s;
	cout << dfs(s) << endl;
	return 0;
}
