import java.io.*;
import java.util.*;
public class Main {
public static void main
(String[] args
) { Scanner in
= new Scanner
(System.
in);
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();
}
}
aW1wb3J0IGphdmEuaW8uKjsKaW1wb3J0IGphdmEudXRpbC4qOwoKcHVibGljIGNsYXNzIE1haW4gewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgewoJCVNjYW5uZXIgaW4gPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJCVByaW50V3JpdGVyIG91dCA9IG5ldyBQcmludFdyaXRlcihTeXN0ZW0ub3V0KTsKCQkKCQlsb25nIGEgPSBpbi5uZXh0TG9uZygpOwoJCWxvbmcgYiA9IGluLm5leHRMb25nKCk7CgkJbG9uZyBuLCBTOwoJCW4gPSBiIC0gYSArIDE7CgkJUyA9IChhICsgYikgKiBuIC8gMjsKCQlvdXQucHJpbnQoUyk7CgkJCgkJb3V0LmZsdXNoKCk7Cgl9Cn0=