#ifndef LOCAL
#pragma GCC optimize ("Ofast")
#endif

#include "bits/stdc++.h"

using namespace std;

#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
    *this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

using ll = long long;
using ld = long double;

constexpr int nax = 105;
constexpr int infty = 1000 * 1000 * 1000 + 5;
constexpr int mod = 998244353;

ll Dodaj(ll a, ll b) {
  a += b;
  if (a >= mod) a -= mod;
  return a;
}

ll Mnoz(ll a, ll b) {
  return (a * b) % mod;
}

map<pair<ll, int>, ll> maski;
ll Maska(ll maska, int len);
ll Maska_(ll maska, int len) {
  if (len == 0) return 1;
  ll wynik = Mnoz(Maska(maska >> 1, len - 1), (maska & 1) + 1);
  for (int d = 1; d * 2 <= len; d++) {
    ll podmaska = maska;
    ll reszta = (maska >> d);
    for (int pow = 2; d * pow <= len; pow++) {
      podmaska &= reszta;
      reszta >>= d;
      wynik = Dodaj(wynik, Mnoz(Maska(podmaska & ((1 << d) - 1), d),
                                Maska(reszta, len - d * pow)));
    }
  }
  return wynik;
}
ll Maska(ll maska, int len) {
  auto res = maski.insert(make_pair(make_pair(maska, len), 0ll));
  if (!res.second) {
    return res.first->second;
  }
  const ll result = Maska_(maska, len);
  return res.first->second = result;
}

int n;
int input[nax];

ll nawias[nax][nax][nax];
bool juz_nawias[nax][nax][nax];
ll Nawias(int a, int d, int pow);
ll Nawias_(int a, int d, int pow) {
  assert(1 <= d and d <= 50);
  assert(2 <= pow and pow <= 100);
  auto DajMaske = [a, d](int m) -> ll {
    ll maska = 0;
    for (int i = 0; i < d; i++) {
      maska ^= ((ll) input[a + m * d + i] << i);
    }
    return maska;
  };
  ll maska = DajMaske(0);
  for (int p = 1; p < pow; p++) {
    maska &= DajMaske(p);
  }
  return Maska(maska, d);
}
ll Nawias(int a, int d, int pow) {
  if (juz_nawias[a][d][pow]) return nawias[a][d][pow];
  juz_nawias[a][d][pow] = true;
  return nawias[a][d][pow] = Nawias_(a, d, pow);
}

ll licz[nax][nax];
bool juz_licz[nax][nax];
ll Licz(int a, int b);
ll Licz_(int a, int b) {
  if (a - 1 == b) return 1;
  assert(0 <= a and a <= b and b < n);
  ll wynik = Mnoz(Licz(a + 1, b), input[a] + 1);
  for (int d = 1; d <= b; d++) {
    for (int pow = 2; a + d * pow <= b + 1; pow++) {
      wynik = Dodaj(wynik, Mnoz(Nawias(a, d, pow), Licz(a + d * pow, b)));
    }
  }
  return wynik;
}
ll Licz(int a, int b) {
  if (juz_licz[a][b]) return licz[a][b];
  juz_licz[a][b] = true;
  return licz[a][b] = Licz_(a, b);
}

char buf[nax];

int main() {
  scanf("%s", buf);
  n = strlen(buf);
  for (int i = 0; i < n; i++) {
    input[i] = (buf[i] == '1');
  }
  printf("%lld\n", Licz(0, n - 1));
  return 0;
}


Measured memory_bytes: 12416