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

#define all(x) (x).begin(), (x).end()
#define dbl(k, x) fixed << setprecision(k) << (x)

template <typename _T>
inline void _DBG(const char *s, _T x) {
  cerr << s << " = " << x << "\n";
}
template <typename _T, typename... args>
void _DBG(const char *s, _T x, args... a) {
  while (*s != ',') cerr << *s++;
  cerr << " = " << x << ',';
  _DBG(s + 1, a...);
}

#define _upgrade                \
  ios_base::sync_with_stdio(0); \
  cin.tie(0);                   \
  cout.tie(0);
#define DBG(...) _DBG(#__VA_ARGS__, __VA_ARGS__)

// ********************** CODE ********************** //

bool check_cons_zeros(string t) {
  int cons_zeros = 0;
  for (auto &c : t) {
    if (c == '0') {
      cons_zeros++;
    } else {
      cons_zeros = 0;
    }
    if (cons_zeros > 1) {
      return true;
    }
  }
  return false;
}

bool check_cons_ones(string t) {
  int cons_ones = 0;
  for (auto &c : t) {
    if (c == '1') {
      cons_ones++;
    } else {
      cons_ones = 0;
    }
    if (cons_ones > 2) {
      return true;
    }
  }
  return false;
}

bool check_one_surr(string t) {
  for (int i = 1; i < t.length() - 1; i++) {
    if (t[i] == '1' && t[i - 1] == '0' && t[i + 1] == '0') {
      return true;
    }
  }
  return false;
}

int main() {
  _upgrade;
  int n;
  cin >> n;
  string t;
  cin >> t;
  if (check_cons_zeros(t) || check_cons_ones(t) || check_one_surr(t)) {
    // cerr << check_cons_zeros(t) << "\n";
    // cerr << check_cons_ones(t) << "\n";
    // cerr << check_one_surr(t) << "\n";
    cout << 0 << "\n";
    return 0;
  }
  long long res = 1e10;  // change
  if (t.length() == 1) {
    if (t[0] == '0') {
      cout << res << "\n";
    } else {
      cout << 2 * res << "\n";
    }
  } else {
    if (t[0] == '1' && t[1] == '1') {
      cout << res - (t.length() + 2) / 3 + 1 << "\n";
    } else if (t[0] == '1' && t[1] == '0') {
      long long need = 1 + (t.length() - 2 + 2) / 3;
      cout << res - (need - 1) << "\n";
    } else {
      long long need = 1 + (t.length() - 1 + 2) / 3;
      cout << res - (need - 1) << "\n";
    }
  }
  return 0;
}
#include <bits/stdc++.h>
using namespace std;

#define all(x) (x).begin(),(x).end()
#define print(x) cout << (x) << '\n'
typedef long long ll;
using P = pair<int,int>;
using Graph = vector<vector<int>>;
//const ll MOD = 1000000007;
const ll MOD = 998244353;

template <typename T> inline bool chmax(T &a, T b) {return a < b ? a = b, true : false;}
template <typename T> inline bool chmin(T &a, T b) {return a > b ? a = b, true : false;}

const int MAX = 500000;
ll fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }
}

// 二項係数計算
ll COM(ll n, ll k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

//xのn乗mod(m)
ll pom(ll x, ll n, ll m) {
    ll ret = 1LL;
    while (n > 0) {
        if (n & 1LL) ret = ret * x % m;
        x = x * x % m;
        n >>= 1;
    }
    return ret;
}

void solve() {
    ll n, m;    cin >> n >> m;

    //末項の値
    ll ans = 1;
    vector<bool> c(m + 1, true);
    for(ll i = 2; i <= m; i++){
        int tmp = i;
        ll k = 0;
        ll t = 1;
        for(int j = 2; j * j <= m; j++){
            if(tmp % j == 0){
                ll k = 0;
                while(tmp % j == 0){
                    k++;
                    tmp /= j;
                }
                t *= COM(n - 1 + k, k);
                t %= MOD;
            }
            if(tmp == 1) break;
        }
        if(tmp > 1){
            t *= n;
            t %= MOD;
        }
        ans += t;
    }
    print(ans % MOD);
}

int main() { 
    cin.tie(0); cout.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(18);

    int t;
    //cin >> t;
    t = 1;
    COMinit();
    while(t--) solve();
    return 0;
}