A - Odds of Oddness Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MB

配点 : 100

問題文

整数 N が与えられます。

高橋君は、N 以下の正整数の中から等確率で 1 つを選んで a とします。

このとき、a が奇数である確率を答えてください。

制約

  • 1 ≤ N ≤ 100

入力

入力は以下の形式で標準入力から与えられる。

N

出力

a が奇数である確率を出力せよ。 出力は、ジャッジの出力との絶対誤差または相対誤差が 10^{-6} 以下のとき正解と判定される。


入力例 1

4

出力例 1

0.5000000000

4 以下の正整数は 1 , 2 , 3 , 44 つであり、そのうち奇数は 1 , 32 つです。以上より、答えは \frac{2}{4} = 0.5 です。


入力例 2

5

出力例 2

0.6000000000

入力例 3

1

出力例 3

1.0000000000

Score : 100 points

Problem Statement

Given is an integer N.

Takahashi chooses an integer a from the positive integers not greater than N with equal probability.

Find the probability that a is odd.

Constraints

  • 1 \leq N \leq 100

Input

Input is given from Standard Input in the following format:

N

Output

Print the probability that a is odd. Your output will be considered correct when its absolute or relative error from the judge's output is at most 10^{-6}.


Sample Input 1

4

Sample Output 1

0.5000000000

There are four positive integers not greater than 4: 1, 2, 3, and 4. Among them, we have two odd numbers: 1 and 3. Thus, the answer is \frac{2}{4} = 0.5.


Sample Input 2

5

Sample Output 2

0.6000000000

Sample Input 3

1

Sample Output 3

1.0000000000