When repairing an electronic board, Basil discovered that the board had already been under repair, and one of the resistors on it was replaced with a strange design. The design consisted of k
series of connected links, and each link in them — of two resistors connected in parallel.
Moreover, in each link, along with the typical resistor, with a clearly readable denomination, there was a resistor with a strange, non-standard marking. Having examined the non-standard resistors, Basil came to the conclusion that they were of the same type. However, he could not determine their value. The total resistance value of the entire circuit was equal to R ohms. Having written out the nominal value of the known resistor for each link in the circuit, Basil received a series of integers r1, r2, ..., rk.
Help Basil — write a program that calculat