Under construction

Still being built. Things may change

Polygon

Time limit1sMemory limit256 MB

Summary
Sum the integers n between a and b for which some n-gon has all of its sides crossed by a single straight line.
Level

Medium7 of 10

Topics
Geometry, Math
Solved
No attempts yet

Problem

Seunghyun drew the figure below on a sheet of paper.

He noticed that for the quadrilateral at the bottom, a single straight line cuts all four sides.

That made him wonder how many sides such a polygon can have.

Write a program that adds up every nn for which an nn-gon exists whose sides can all be cut by one straight line. There are infinitely many such nn, so count only the ones with nn between aa and bb, inclusive. A polygon has at least three sides, so nn is at least 3.

Input

The first line contains two natural numbers aa and bb, separated by one space. (1≤a≤b≤1091 \le a \le b \le 10^9)

Output

Print the sum of every nn that satisfies the condition on the first line.

Examples3

  1. Example 1

    Input
    3 4
    
    Expected output
    4
    
  2. Example 2

    Input
    1 3
    
    Expected output
    0
    
  3. Example 3

    Input
    5 10
    
    Expected output
    24