#include <bits/stdc++.h>
// iostream is too mainstream
#include <cstdio>
// bitch please
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <cmath>
#include <iomanip>
#include <time.h>
#define dibs reserve
#define OVER9000 1234567890123456789LL
#define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++)
#define tisic 47
#define soclose 1e-8
#define chocolate win
// so much chocolate
#define patkan 9
#define ff first
#define ss second
#define abs(x) ((x < 0)?-(x):x)
#define uint unsigned int
#define dbl long double
#define pi 3.14159265358979323846
using namespace std;
// mylittledoge

typedef long long cat;

#ifdef DONLINE_JUDGE
	// palindromic tree is better than splay tree!
	#define lld I64d
#endif

cat mod = 998244353;
int ans_small[21][1<<20];

template <typename T>
cat solve(T X, int N) {
	if(N <= 20) {
		int mask = 0;
		mask = X;
		return ans_small[N][mask];
	}
	vector<uint64_t> suf_mask;
	vector< vector<cat> > cnt(N+1, vector<cat>(N+1, 0));
	for(int i = 0; i < N; i++) {
		cnt[i][i+1] = ((X>>i)&1)+1;
	}
	for(int i = 0; i < N; i++) for(int l = 1; l <= (N-i)/2; l++) {
		uint64_t mask = ((1LL<<l)-1);
		mask &= X>>i;
		for(int k = 2*l; k <= N-i; k += l) {
			mask &= X>>(i+k-l);
			cnt[i][i+k] += solve(mask, l);
			if(cnt[i][i+k] >= mod) cnt[i][i+k] -= mod;
		}
	}
	vector<cat> dp(N+1, 0);
	dp[0] = 1;
	cat mod2 = 4 * mod * mod;
	for(int i = 0; i <= N; i++) {
		dp[i] %= mod;
		for(int j = i+1; j <= N; j++) {
			dp[j] += cnt[i][j] * dp[i];
			if(dp[j] >= mod2) dp[j] -= mod2;
		}
	}
	return dp[N];
}

cat solve(string X, int N) {
	if(N <= 20) {
		int mask = 0;
		for(int i = 0; i < N; i++) if(X[i] == '1') mask += (1<<i);
		return ans_small[N][mask];
	}
	vector<uint64_t> suf_mask;
	suf_mask.resize(N+1, 0);
	for(int i = N-1; i >= 0; i--) suf_mask[i] = 2 * suf_mask[i+1] + (X[i]-'0');
	vector< vector<cat> > cnt(N+1, vector<cat>(N+1, 0));
	for(int i = 0; i < N; i++) {
		cnt[i][i+1] = (X[i]-'0'+1);
	}
	for(int i = 0; i < N; i++) for(int l = 1; l <= (N-i)/2; l++) {
		uint64_t mask = ((1LL<<l)-1);
		mask &= suf_mask[i];
		for(int k = 2*l; k <= N-i; k += l) {
			mask &= suf_mask[i+k-l];
			cnt[i][i+k] += solve(mask, l);
			if(cnt[i][i+k] >= mod) cnt[i][i+k] -= mod;
		}
	}
	vector<cat> dp(N+1, 0);
	dp[0] = 1;
	cat mod2 = 4 * mod * mod;
	for(int i = 0; i <= N; i++) {
		dp[i] %= mod;
		for(int j = i+1; j <= N; j++) {
			dp[j] += cnt[i][j] * dp[i];
			if(dp[j] >= mod2) dp[j] -= mod2;
		}
	}
	return dp[N];
}

int main() {
	cin.sync_with_stdio(0);
	cin.tie(0);
	cout << fixed << setprecision(10);
	ans_small[0][0] = 1;
	for(int l = 1; l <= 20; l++) for(int i = 0; i < (1<<l); i++) {
		cat sum = ans_small[l-1][i>>1] * (1+(i&1)), mod2 = 4 * mod * mod;
		for(int j = 1; j <= l/2; j++) {
			int mask = i & ((1<<j)-1), suf = i >> j;
			for(int k = 2*j; k <= l; k += j) {
				mask &= suf;
				suf >>= j;
				sum += 1LL * ans_small[l-k][suf] * ans_small[j][mask];
				if(sum >= mod2) sum -= mod2;
			}
		}
		ans_small[l][i] = sum % mod;
	}
	string S;
	cin >> S;
	cout << solve(S, S.length()) << "\n";
	return 0;
}

// look at my code
// my code is amazing


Measured memory_bytes: 45568