#include <iostream>
#include<bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
// #define ONLINE_JUDGE
#ifndef ONLINE_JUDGE
template<typename T>
void __p(T a) {
	cout << a;
}
template<typename T, typename F>
void __p(pair<T, F> a) {
	cout << "{";
	__p(a.first);
	cout << ",";
	__p(a.second);
	cout << "}";
}
template<typename T>
void __p(std::vector<T> a) {
	cout << "{";
	for (auto it = a.begin(); it < a.end(); it++)
		__p(*it), cout << ",}"[it + 1 == a.end()];
}
template<typename T, typename ...Arg>
void __p(T a1, Arg ...a) {
	__p(a1);
	__p(a...);
}
template<typename Arg1>
void __f(const char *name, Arg1 &&arg1) {
	cout << name << " : ";
	__p(arg1);
	cout << endl;
}
template<typename Arg1, typename ... Args>
void __f(const char *names, Arg1 &&arg1, Args &&... args) {
	int bracket = 0, i = 0;
	for (;; i++)
		if (names[i] == ',' && bracket == 0)
			break;
		else if (names[i] == '(')
			bracket++;
		else if (names[i] == ')')
			bracket--;
	const char *comma = names + i;
	cout.write(names, comma - names) << " : ";
	__p(arg1);
	cout << " | ";
	__f(comma + 1, args...);
}
#define trace(...) cout<<"Line:"<<__LINE__<<" ", __f(#__VA_ARGS__, __VA_ARGS__);
#else
#define trace(...)
#endif
typedef long long int ll;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename T>
using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define pb(x) push_back(x)
#define mp(x,y) make_pair(x,y)
typedef pair<ll , ll> pp;
typedef pair<pair<ll, ll>, ll> ppp;
#define X first
#define Y second
#define getones(n) __builtin_popcountll(n)
#define debug(x) cout<<#x<<" :: "<<x<<"\n";
#define debug2(x,y) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\n";
#define debug3(x,y,z) cout<<#x<<" :: "<<x<<"\t"<<#y<<" :: "<<y<<"\t"<<#z<<" :: "<<z<<"\n";
#define fastIO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define frv(i,a,b) for (ll i = (a), _b = (b); i < _b; i++)
#define frrv(i,a,b) for (ll i = (a), _b = (b); i >= _b; i--)
#define fr(i,n) for (ll i = 0, _n = (n); i < _n; i++)
#define frr(i,n) for (ll i = n - 1; i >= 0; i--)
#define fordata(it,ar) for (auto it = ar.begin(); it != ar.end(); it++)
#define fill(ar,val) fr(i,sizeof(ar)/sizeof(ll)) ar[i]=val
#define fill2(ar,val) fr(i,sizeof(ar)/sizeof(ar[0])) fr(j,sizeof(ar[0])/sizeof(ll)) ar[i][j]=val
#define fill0(ar) memset(ar,0,sizeof(ar))
#define sz(x) (int)x.size()
#define len(x) (int)x.length()
#define all(ar) ar.begin(), ar.end()
#define INF 1000000000000000000
#define PI 3.14159265358979323846L
#define max3(a,b,c) max(a,max(b,c))
#define min3(a,b,c) min(a,min(b,c))
const ll N = 1e6 + 1;
const ll K = 998244353;
#define vv vector<ll>
const ll globalmod = 1e9 + 9;
vv spf(N);
void sieve() {
	frv(i, 2, N) {
		spf[i] = i;
	}
	for (int i = 2; i * i <= N; i++) {
		for (int j = i; j <= N; j += i) {
			if (spf[j] == j) {
				spf[j] = i;
			}
		}
	}
}
ll binaryexpo(ll a, ll b, ll m) {
	a %= m;
	ll res = 1;
	while (b > 0) {
		if (b & 1) {
			res = (res * a) % m;
		}
		a = (a * a) % m;
		b >>= 1;
	}
	return res;
}
vv fact(N);
ll ncr(ll a, ll b) {
	ll temp = fact[a];
	ll init = ((fact[b] * fact[a - b]) % K);
	temp *= binaryexpo(init, K - 2, K);
	temp %= K;
	return temp;
}
int main() {
	fact[0] = 1;
	frv(i, 1, N) {
		fact[i] = fact[i - 1] * i;
		fact[i] %= K;
	}
	sieve();
	ll t = 1;
	// cin >> t;
	while (t--) {
		ll n, m;
		cin >> n >> m;
		ll sum = 0;
		frv(i, 1, m + 1) {
			ll temp = i;
			ll pr = 1;
			while (spf[temp] != 0) {
				ll ind = spf[temp];
				ll cnt = 0;
				while (spf[temp] == ind) {
					temp /= ind;
					cnt++;
				}
				pr *= (ncr(cnt + n - 1, n - 1));
				pr %= K;
			}
			// trace(pr)
			sum += pr;
			sum %= K;
		}
		cout << sum;
	}
}
#include <bits/stdc++.h>
using namespace std;

#define forn(i, n) for(int i=0; i<(n); i++)
#define readVec(v) forn(i, v.size()){cin >> v[i];}
#define printArr(arr, n) forn(i, n){if (i) cout << " "; cout << arr[i];} cout << endl;
#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define f first
#define s second

typedef long long ll;
typedef double ld;
typedef long double lld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<bool> vb;
typedef vector<pii> vpi;
typedef vector<pll> vpl;
typedef vector<vi> vii;

//Printing pairs and vectors
template<typename A, typename B> ostream& operator<<(ostream &cout, pair<A, B> const &p) { return cout << "(" << p.f << ", " << p.s << ")"; }
template<typename A> ostream& operator<<(ostream &cout, vector<A> const &v) {
  cout << "["; for(int i = 0; i < v.size(); i++) {if (i) cout << ", "; cout << v[i];} return cout << "]";
}

//2 147 483 647 int max
//9 223 372 036 854 775 807 ll max
void fast_io(){
   ios_base::sync_with_stdio(0);
   cin.tie(NULL);
   cout.tie(NULL);
}
void file_io(string taskname){
   string fin = taskname + ".in";
   string fout = taskname + ".out";
   const char* FIN = fin.c_str();
   const char* FOUT = fout.c_str();
   freopen(FIN, "r", stdin);
   freopen(FOUT, "w", stdout);
   fast_io();
}


int main(){
    fast_io();
    ll b, c;
    cin >> b >> c;
    // ll left = b, right = b;

    vpl v;

    v.pb(mp(-b-(c-1)/2, -b));
    v.pb(mp(-b, -b+(c-1)/2));
    v.pb(mp(b-c/2, b));
    if(c > 1) {v.pb(mp(b, b+(c-2)/2));}
    else {v.pb(mp(b, b));}
    sort(v.begin(), v.end());
    ll tot = 0;

    forn(i, 4){
      tot += v[i].s-v[i].f + 1;
    }
    forn(i, 4){
      for(int j=i+1; j<4; j++){
        tot -= max(0LL, min(v[i].s, v[j].s)-max(v[i].f, v[j].f)+1);
      }
    }
    forn(i, 4){
      tot += max(0LL, min(v[i].s, min(v[(i+1)%4].s, v[(i+2)%4].s))-max(v[i].f, max(v[(i+1)%4].f, v[(i+2)%4].f))+1);
    }
    tot -= max(0LL, min(v[0].s, min(v[1].s, min(v[3].s, v[2].s)))-max(v[0].f, max(v[1].f,  max(v[3].f, v[2].f)))+1);
    cout << tot << "\n";
}
