To control the world, which is the ambition of Ryntarou Okabe, a mad scientist, is a problem that both of technology and wisdom are needed to handle it. After long time of experiment, Okabe eventually invented a strange machine, Telephone Oven, which can be used to send mails to the past! The mail is called D-mail in short. D-mail can be used to change the future of the world, but it cannot change it as what Okabe thinks exactly. According to the theory of time travel, the future of the world can be described by a real number, which is called Divergence. Now, Okabe has already calculated the Divergence that represents the world in which Okabe takes the control of the whole world. He calls it Steins Gate. There are kinds of D-mails with different content. And he has got the influence each kind of D-mail has to the Divergence. Now he wants to change the Divergence to a number as close to the Steins Gate as possible by selecting several kinds of D-mail, while each kind of D-mail cannot be used more than once. (He can choose 0 D-mail.)
But if he changes the divergence too greatly that it becomes bigger than 2 or equals 2 during the process he send D-mail, then will he be trapped in the infinity maze of time and be "corrected" by the world itself, so he should choose the best order to send the D-mail so as to keep alive before he achieves his goal. Can you help him calculate the best result he can get? The original Divergence is 0.