typedef __int128_t t; t f(t i,t n,t v){ t i2=i*(i+1)/2; t i3=i2*(i*2+1)/3; t n2=n*(n+1)/2; t v2=v*(v+1)/2; return i*n2-i2*(n+1)*v+i3*v2; } main(){ t n=0,i=0,a=0,v; scanf("%d%d",&n,&i); while(i){ v=n/i; a+=f(i,n,v); i=n/(v+1); a-=f(i,n,v); } printf("%d",a%998244353); }