#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
map<string, int> dp;
int go(string str) {
	if (dp.find(str) != dp.end()) return dp[str];
	string tt = str; tt.pop_back();
	int res = (str.back() - '0' + 1) * go(tt) % mod;
	for (int l = 1; l <= (int)str.size() / 2; l++) {
		tt.assign(str.end() - l, str.end());
		for (int i = 2; i * l <= (int)str.size(); i++) {
			for (int j = 0; j < l; j++)
				if (str[str.size() - i * l + j] == '0')
					tt[j] = '0';
			res = (res + 1ll * go(tt) * go(str.substr(0, (int)str.size() - i * l))) % mod;
		}
	}
	return dp[str] = res;
}
int main() {
	string S;
	cin >> S;
	dp[""] = dp["0"] = 1;
	dp["1"] = 2;
	cout << go(S) << endl;
	return 0;
}