    function Main(input) {
      const N = parseInt(input)
      if (N / 2 == Math.floor(N / 2)) {
        console.log(1 / 2)
      } else {
        console.log((N + 1) / (2 * N))
      }
    }
    Main(require('fs').readFileSync('/dev/stdin', 'utf8'))