#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <map>
#include <string>
#include <iostream>
#define LL long long
using namespace std;
const LL Mod = 998244353;
map <string, LL> mp;
string s;
LL F(string st) {
	if(!st.size()) return 1;
	if(mp.count(st)) return mp[st];
	LL res = F(st.substr(1));
	if(st[0] == '1') res = res*2%Mod;
	LL sz = st.size();
	for(LL i = 1; i <= sz; i++){
		string tmp = "";
		for(LL j = 1; j <= i; j++) tmp += '1';
		for(LL j = 0; j+i <= sz; j += i){
			for(LL k = 0; k < i; k++) if(st[j+k] == '0') tmp[k] = '0';
			if(j) res = (res+F(tmp)*F(st.substr(j+i)))%Mod;
		}
	}
	return mp[st] = res;
}
int main() {
	LL i, j, k;
	cin >> s;
	cout << F(s) << endl;
	return 0;
}