import java.io.*;
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		
		long a = in.nextLong();
		long b = in.nextLong();
		long n, S;
		n = b - a + 1;
		S = (a + b) * n / 2;
		out.print(S);
		
		out.flush();
	}
}