#include<stdio.h>
int main(){
int n,m,i;
int total;
while(scanf("%d%d",&n,&m)!=EOF){
i=n;
for(total=0;total<=m;i++){
total=total+i;
}
printf("%d\n",i-n);
return 0;