def main():
    n = int(input())
    t = (n+1) // 2
    if n == 1:
        print(1)
    elif n % 2 == 0:
        print(0.5)
    else:
        print(t*1.0 / n)
main() def main():
    n = int(input())
    t = (n+1) // 2
    if n == 1:
        print(1)
    elif n % 2 == 0:
        print(0.5)
    else:
        print(t*1.0 / n) main n = int(input()) n int(input()) int input() input t = (n+1) // 2 t (n+1) // 2 n+1 n 1 2 if n == 1:
        print(1)
    elif n % 2 == 0:
        print(0.5)
    else:
        print(t*1.0 / n) n == 1 n 1 print(1) print 1 elif n % 2 == 0:
        print(0.5)
     n % 2 == 0 n % 2 n 2 0 print(0.5) print 0.5 print(t*1.0 / n) print t*1.0 / n t*1.0 t 1.0 n main() main def main():
    n = int(input())
    t = (n+1) // 2
    if n == 1:
        print(1)
    elif n % 2 == 0:
        print(0.5)
    else:
        print(t*1.0 / n) def main():
    n = int(input())
    t = (n+1) // 2
    if n == 1:
        print(1)
    elif n % 2 == 0:
        print(0.5)
    else:
        print(t*1.0 / n) main
def main():
    n = int(input())
    t = (n+1) // 2
    if n == 1:
        print(1)
    elif n % 2 == 0:
        print(0.5)
    else:
        print(t*1.0 / n)
main()