package implementation;
import java.util.ArrayList;
import java.util.Scanner;
public class Implementation_1292 {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
//뭐가 문제지.??
int N1 = sc.nextInt();
int N2 = sc.nextInt();
int sum =0;
ArrayList<Integer> arr = new ArrayList<>();
for(int i =1;i<46;i++){
for(int j=0;j<i;j++){
arr.add(i);
}
}
for(int i = N1-1;i<N2;i++){
sum = sum + arr.get(i);
}
System.out.println(sum);
sc.close();
}
}