Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/ogirlik-birliklari

Units of mass

Medium 1000 ms 64 MB 43%
Share

A mass unit number $N$ and the mass of a body $M$ in that unit are given. Units: $1$ — kilogram, $2$ — milligram, $3$ — gram, $4$ — tonne, $5$ — centner. Find the mass in kilograms.

The numbers of the mass units and the value of each in kilograms

Input

One line with a unit number $N$ and a real number $M$.

Output

One number — the mass in kilograms, with exactly 6 digits after the decimal point (for example, 0.500000).

Note

$1 \le N \le 5$
$0 \lt M \le 10^{6}$
$M$ is an integer or a number with one digit after the decimal point, and an integer in milligrams ($N = 2$)

Examples

Input #1
1 15
Output #1
15.000000
Input #2
3 500
Output #2
0.500000

Sign in to submit a solution

Signing up is free and takes a minute.