INSTRUKCIJE | 프로그래밍의 벗 PivotOJ
PivotOJ

INSTRUKCIJE

시간 제한: 1000ms메모리 제한: 128MB출처: CHC 2008 Regional Competition - JuniorsBOJ 8974

문제

Little Marica started elementary school this year. Soon she will have her first exams, including the math exam. She is taking it seriously and thinks she is ready. Her older brother is helping her by giving her problems to solve. 

In one of his problems he writes down a sequence of numbers consisting in order of one number 1, two numbers 2, three numbers 3 etc. Now he tells Marica two integers A and B; her task is to find the sum of integers with indices between A and B, inclusive. For example, if A is 1 and B is 3, then the answer is the sum of the first three elements, which is 1+2+2=5. 

Write a program that finds the sum so that Marica's brother can verify her result. 

입력

The first and only line contains the positive integers A and B, 1 ≤ A ≤ B ≤ 1000. 

 

출력

Output the sum on a single line. 

 

예제

예제 1

입력
1 3
출력
5

예제 2

입력
3 7
출력
15

예제 3

입력
50 50
출력
10
코드를 제출하려면 로그인하세요.