    #include<bits/stdc++.h>
    #define F first
    #define S second
    using ll = long long;
    const ll mod = 1000000007;
    const ll infi = 1000000000000000;
    const ll md = 998244353;
    using namespace std;
    using vl = vector<ll>;
    using pll =  pair<ll,ll>;

    void solve(){
        double n,e,o;
        cin>>n;
        e = (int)n/2;
        o = n- e;
        double ans = o/n;
        printf("%0.6lf",ans);
    }
     
    int main() {
        ios_base::sync_with_stdio(false);
        cin.tie(NULL);
        //int n;cin>>n; for(int i=0;i<n;i++)
        solve();
        return 0;
    } 