There are n books on Rikka's desk. The length, width, height and weight of the i-th book are

, 1, 1 and

respectively. We call the two sides of length

as long sides, and two sides of length 1 as short sides. For each book, the mass is evenly distributed in its volume.
Today, Rikka wants to stack these books on her desk. Rikka plans to do it in n turns: In each turn, she will select out one book among all remaining books, and stack it directly above the previous book (The first book will be put directly on the desk).
For tidiness, Rikka make the following four requirement:
- The left long sides of all books must be coplaner. So do the right long sides;
- The plane containing all left long sides must be vertical to the ground. So do the right long sides;
- All short sides of all books must be parallel to the border of the desk;
- The book stack must be stable. Falling thick books are dangerous!
Informally, the books will be stacked as the following figure:

For fun, Rikka wants to make the book stack looking as strange as possible. For each book, Rikka defines its strangeness as the horizontal distance for its front short edge to be outside the desk. The strangeness of the whole book stack is defined as the maximum strangeness of books. For example, in the previous figure, the strangeness of the book stack is equal to the length of segment TU.
Rikka wants you to come up with a stacking plan so that the strangeness of the book stack is as large as possible.
More assumptions:
- Suppose the gravity coefficient is fixed. It will not change when the height change;
- Suppose the shape of the desk and books would never change.