#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <map>
#include <string>
using namespace std;
typedef long long LL;
const LL N = 998244353;

map <string,LL> mp[2];
string u;

LL f(LL id,string s){
//	cout << id << ' ' << s << endl;
	if(mp[id].find(s) != mp[id].end()) return mp[id][s];
	LL ret = 0,len;
	len = s.length();
	if(id){
		for(LL i = 0;i < len;i ++) ret = (ret + f(1,s.substr(0,i)) * f(0,s.substr(i,len))) % N;
		mp[id][s] = ret; return ret;
	}
	else{
		for(LL i = 1;i < len;i ++){
			if(len % i) continue;
			string t = "";
			for(LL j = 0;j < i;j ++) t += '1';
			for(LL j = 0;j < len;j += i){
				for(LL k = 0;k < i;k ++){
					if(s[j + k] == '0') t[k] = '0';
				}
			}
//			cout << t << ',' << f(1,t) << endl;
			ret += f(1,t); ret %= N;
		}
		mp[id][s] = ret; return ret;
	}
}

int main(){
	mp[0][""] = mp[1][""] = 1;
	mp[0]["0"] = 1; mp[0]["1"] = 2;
	mp[1]["0"] = 1; mp[1]["1"] = 2;
	cin >> u;
	cout << f(1,u) << '\n';
	return 0;
}