#include<bits/stdc++.h>   #define For(i,a,b) for(register int i=(a);i<=(b);++i)   #define Rep(i,a,b) for(register int i=(a);i>=(b);--i)   using namespace std;   inline int read()   {       char c=getchar();int x=0;bool f=0;       for(;!isdigit(c);c=getchar())f^=!(c^45);       for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);       if(f)x=-x;return x;   }       #define mod 998244353   struct modint{       int x;       modint(int o=0){x=o;}       modint &operator = (int o){return x=o,*this;}       modint &operator +=(modint o){return x=x+o.x>=mod?x+o.x-mod:x+o.x,*this;}       modint &operator -=(modint o){return x=x-o.x<0?x-o.x+mod:x-o.x,*this;}       modint &operator *=(modint o){return x=1ll*x*o.x%mod,*this;}       modint &operator ^=(int b){           modint a=*this,c=1;           for(;b;b>>=1,a*=a)if(b&1)c*=a;           return x=c.x,*this;       }       modint &operator /=(modint o){return *this *=o^=mod-2;}       modint &operator +=(int o){return x=x+o>=mod?x+o-mod:x+o,*this;}       modint &operator -=(int o){return x=x-o<0?x-o+mod:x-o,*this;}       modint &operator *=(int o){return x=1ll*x*o%mod,*this;}       modint &operator /=(int o){return *this *= ((modint(o))^=mod-2);}       template<class I>friend modint operator +(modint a,I b){return a+=b;}       template<class I>friend modint operator -(modint a,I b){return a-=b;}       template<class I>friend modint operator *(modint a,I b){return a*=b;}       template<class I>friend modint operator /(modint a,I b){return a/=b;}       friend modint operator ^(modint a,int b){return a^=b;}       friend bool operator ==(modint a,int b){return a.x==b;}       friend bool operator !=(modint a,int b){return a.x!=b;}       bool operator ! () {return !x;}       modint operator - () {return x?mod-x:0;}   };   inline modint qpow(modint a,int b){return a^b;}      #define maxn 800005   const modint G=3,Ginv=modint(1)/3;   struct poly{       vector<modint>a;       modint& operator [](int i){return a[i];}       int size(){return a.size();}       void resize(int n){a.resize(n);}   };   inline poly one(){poly a;a.a.push_back(1);return a;}   int rev[maxn];   inline int ext(int n){    int k=0;    while((1<<k)<n)++k;return k;    }   inline void init(int k){    int n=1<<k;    For(i,0,n-1)rev[i]=(rev[i>>1]>>1)|((i&1)<<(k-1));   }   void ntt(poly&a,int k,int typ)   {    int n=1<<k;    For(i,0,n-1)if(i<rev[i])swap(a[i],a[rev[i]]);     for(int mid=1;mid<n;mid<<=1)    {     modint wn=(typ>0?G:Ginv)^((mod-1)/(mid<<1));     for(int r=mid<<1,j=0;j<n;j+=r){      modint w=1;      for(int k=0;k<mid;++k,w=w*wn){       modint x=a[j+k],y=w*a[j+k+mid];       a[j+k]=x+y,a[j+k+mid]=x-y;      }     }    }    if(typ<0){     modint inv=modint(1)/n;     For(i,0,n-1)a[i]*=inv;    }   }      poly operator *(poly a,poly b)   {    int n=(int)a.size()+(int)b.size()-1,k=ext(n);    a.resize(1<<k),b.resize(1<<k),init(k);    ntt(a,k,1),ntt(b,k,1);    For(i,0,(1<<k)-1)a[i]*=b[i];    ntt(a,k,-1),a.resize(n);return a;   }      int n,k;   modint fac[maxn],ifac[maxn],iv[maxn];   inline modint sign(int x){return (x&1)?(mod-1):(1);}   poly f,g,s,a,b;   inline void get_s(int n){    fac[0]=ifac[0]=1;    For(i,1,n+n)     fac[i]=fac[i-1]*i,     iv[i]=modint(1)/i,     ifac[i]=ifac[i-1]*iv[i];    int sz=n+1;    a.resize(sz),b.resize(sz);    For(i,0,n)     a[i]=sign(i)*ifac[i],     b[i]=(modint(i)^n)*ifac[i];    s=a*b; s.resize(n+1);   }      int main()   {    n=read(),k=read();    get_s(k);    modint res=0,C=1;    For(i,1,k){     if(n-i+1==0)break;     C*=(n-i+1),C/=i;     res+=s[i]*fac[i]*C*qpow(n+1,n-i);    }    cout<<res.x;       return 0;   }