def readinput():
    n=int(input())
    return n

def main(n):
    if n%2==0:
        return 0.5
    else:
        return (n//2+1)/n


if __name__=='__main__':
    n=readinput()
    ans=main(n)
    print(ans) def readinput():
    n=int(input())
    return n readinput n=int(input()) n int(input()) int input() input return n n def main(n):
    if n%2==0:
        return 0.5
    else:
        return (n//2+1)/n main if n%2==0:
        return 0.5
    else:
        return (n//2+1)/n n%2==0 n%2 n 2 0 return 0.5 0.5 return (n//2+1)/n (n//2+1)/n n//2+1 n//2 n 2 1 n n n if __name__=='__main__':
    n=readinput()
    ans=main(n)
    print(ans) __name__=='__main__' __name__ '__main__' n=readinput() n readinput() readinput ans=main(n) ans main(n) main n print(ans) print ans ans=main(n) main(n) ans def main(n):
    if n%2==0:
        return 0.5
    else:
        return (n//2+1)/n def main(n):
    if n%2==0:
        return 0.5
    else:
        return (n//2+1)/n main def readinput():
    n=int(input())
    return n def readinput():
    n=int(input())
    return n readinput n=readinput() readinput() n
def readinput():
    n=int(input())
    return n

def main(n):
    if n%2==0:
        return 0.5
    else:
        return (n//2+1)/n


if __name__=='__main__':
    n=readinput()
    ans=main(n)
    print(ans)
