#include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
const int MOD = 998244353;
int ksm(int a,int b){
    int ans=1;
    while(b){
        if(b&1)
            ans=(1LL*ans*a)%MOD;
        a=(1LL*a*a)%MOD;
        b>>=1;
    }
    return ans;
}
int fac[1001010],fac_inv[1001010];
void init(int N){
    fac[0]=1;
    for(int i=1;i<=N;i++)
        fac[i]=(1LL*fac[i-1]*i)%MOD;
    fac_inv[N]=ksm(fac[N],MOD-2);
    for(int i=N-1;i>=0;i--)
        fac_inv[i]=(1LL*fac_inv[i+1]*(i+1))%MOD;
}
int C(int n,int m){
    return 1LL*fac[n]*fac_inv[m]%MOD*fac_inv[n-m]%MOD;
}
int work(int n,int m){
    return C(n+m,n);
}
int inv2,ans=0,tmp=0,n,m;
int main(){
    init(1001000);
    inv2=ksm(2,MOD-2);
    scanf("%d %d",&n,&m);
    ans=max(n,m);
    for(int i=1;i<=min(n,m);i++){
        tmp=(tmp+1LL*work(i,i)*work(n-i,m-i)%MOD)%MOD;
    }
    tmp=(1LL*tmp*inv2)%MOD;
    tmp=(1LL*tmp*ksm(work(n,m),MOD-2))%MOD;
    ans+=tmp;
    printf("%d\n",ans);
    return 0;
}
