#include<bits/stdc++.h>
using namespace std;
#define ll long long
const ll mod=998244353;
ll n,m;
ll pow(ll a,ll b)
{
if(b==0) return 1;
if(b%2==1) return a*pow(a,b-1)%mod;
else
{
ll mul=pow(a,b/2);
return mul*mul%mod;
}
}
int main()
{
ios::sync_with_stdio(false);
cin>>n>>m;
cout<<pow(m+1,n)<<endl;
}