#!/usr/bin/env python3

def main():
    N=  int(input())
    ans = (N+1)//2/N
    print(ans)
    
if __name__ == "__main__":
    main() def main():
    N=  int(input())
    ans = (N+1)//2/N
    print(ans)
     main N=  int(input()) N int(input()) int input() input ans = (N+1)//2/N ans (N+1)//2/N (N+1)//2 N+1 N 1 2 N print(ans) print ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    N=  int(input())
    ans = (N+1)//2/N
    print(ans)
     def main():
    N=  int(input())
    ans = (N+1)//2/N
    print(ans)
     main
#!/usr/bin/env python3

def main():
    N=  int(input())
    ans = (N+1)//2/N
    print(ans)
    
if __name__ == "__main__":
    main()
