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

const int P = 998244353;

unordered_map<string, int> memF, memG;

int F(const string &s);
int G(const string &s) {
	if (s.size() == 1)
		return s[0] - '0' + 1;
	if (memG.count(s)) return memG[s];
	int ans = 0;
	for (int i = 1; i < (int)s.size(); ++i)
		if (s.size() % i == 0) {
			string tmp(i, '1');
			for (int j = 0; j < (int)s.size(); j += i)
				for (int k = 0; k < i; ++k)
					if (s[j + k] == '0') tmp[k] = '0';
			ans = (ans + F(tmp)) % P;
		}
	return memG[s] = ans;
}
int F(const string &s) {
	if (s.empty())
		return 1;
	if (memF.count(s)) return memF[s];
	int ans = 0;
	for (int i = 1; i <= (int)s.size(); ++i)
		ans = (ans + 1LL * G(s.substr(0, i)) * F(s.substr(i, (int)s.size() - i))) % P;
	return memF[s] = ans;
}

int main() {
	string s;
	cin >> s;
	cout << F(s) << '\n';
	return 0;
}
