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

static const int mod = 998244353;
inline int add(int x, int y) { return (x += y) >= mod ? x - mod : x; }
inline void inc(int &x, int y) { (x += y) >= mod && (x -= mod); }
inline int mul(int x, int y) { return 1LL * x * y % mod; }

unordered_map<string, int> dp;
int dfs(const string &s) {
  if (s.empty()) return 1;
  if (dp.find(s) != dp.end()) return dp[s];
  int n = (int)s.size();
  int &res = dp[s];
  res = dfs(s.substr(1));
  if (s[0] == '1') inc(res, res);
  for (int len = 1; len < n; ++len) {
    string f = s.substr(0, len);
    for (int i = len; i + len - 1 < n; i += len) {
      for (int j = 0; j < len; ++j) {
        if (s[i + j] == '0' && f[j] == '1') f[j] = '0';
      }
      inc(res, mul(dfs(f), dfs(s.substr(i + len))));
    }
  }
  return res;
}

int main() {
  string s;
  cin >> s;
  cout << dfs(s) << endl;
  return 0;
}
