Problem:
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

Solution in C# (Mono 4.6.2.0) (judge verdict: Accepted)

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using static System.Console;
using static System.Math;
using static Utils;
class Program
{


    void Solve()
    {
        var N = io.Int;
        WriteLine(
            (double)(Enumerable.Range(1, N).Count(x => x % 2 != 0)) / N
            );

    }


    SimpleIO io = new SimpleIO();
    public static void Main(string[] args) => new Program().Stream();
    private void Stream()
    {
        //var exStdIn = new System.IO.StreamReader("stdin.txt");
        //SetIn(exStdIn);
        Solve();
        io.Flush();
    }

}

class SimpleIO
{
    string[] _nextBuffer;
    int _bufferCnt;
    char[] cs = new char[] { ' ', '"', ',' };
    StreamWriter sw = new StreamWriter(OpenStandardOutput())
    {
#if DEBUG
        AutoFlush = true
#else
        AutoFlush = false
#endif
    };
    public SimpleIO()
    {
        _nextBuffer = new string[0];
        _bufferCnt = 0;
        SetOut(sw);
    }
    string Next()
    {
        if (_bufferCnt < _nextBuffer.Length) return _nextBuffer[_bufferCnt++];
        var st = ReadLine();
        while (st == string.Empty) st = ReadLine();
        _nextBuffer = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
        _bufferCnt = 0;
        return _nextBuffer[_bufferCnt++];
    }
    public string String => Next();
    public char Char => char.Parse(String);
    public int Int => int.Parse(String);
    public long Long => long.Parse(String);
    public double Double => double.Parse(String);
    public void Flush() => Out.Flush();
}
class Utils
{
    public static T id<T>(T x) => x;
}