Geometry Once Again

Stan is in deep shock as nobody likes his problems anymore, and so with his killer instinct of problem- setter he sets out again to set pure geometric+numerical problems that will irritate everyone once again as it did three years ago. With a Mardell effect he tells “MOO! HAA! HAA, all the geometry haters I will make you panic once again”. In reality the problem is not that bad at all, just look at the picture below: In the picture you can see three equilateral triangles in a hexagon. All the angles of this hexagon are equal to one another. The sides AB=BC=DE=EF=a and AF=CD=b. In spite of the legend, the value of a is within 100000 and 200000 and the value of b is within the range -5000 to +5000 of the value of a. In this picture you can see two triangles having a common edge GH and so they actually create the shape of a diamond. The bottom corner of that diamond is coincident with point A. One corner of the third triangle is coincident with point E. All these three triangles are congruent. Given the value of a and b your main job is to determine the maximum possible size of the side of the equilateral triangles, keeping the orientation as shown in the picture above. By keeping the orientation I mean the bottom corner diamond must be coincident with A, one corner of the third triangle must be coincident with E and the third triangle must touch the diamond at a point G, where G is actually another corner of the diamond. Input The input file contains at most 200 lines of inputs. Each line contains three integers a (100000 ≤ a ≤ 200000), start, end (−5000 ≤ start ≤ end ≤ 5000). Input is terminated by a line containing three zeroes. Output Suppose if b = a + k, then the largest possible side of the equilateral triangle is denoted by Sk. In this problem for each line of input except the last one you will have to find the value of end ∑ Sk k=start

2/2 and print the nearest integer of this value in a single line. Sample Input 100000 -10 10 100001 -10 10 000 Sample Output 2122714 2122735