#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
// #pragma GCC target("avx2")
// 293206GT
#include <array>
#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <climits>
#include <limits>
#include <set>
#include <map>
#include <queue>
//#include <unordered_map>
//#include <unordered_set>
//#include <unordered_set>
//#include <stack>
#include <string>
#include <algorithm>
#include <random>
#include <bitset>
#include <chrono>
//#include <cstdlib>
//#include <cstring>

// #include <bits/extc++.h>
// using namespace __gnu_pbds;
//template<class T>
//using OrderedSet = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
using ll = long long;
#define int ll
// #define int long long
using namespace std;
#define put(a) cout << (a) << '\n'
#define sqr(x) ((x) * (x))
typedef pair<int, int> pii;
typedef long double ld;
typedef pair<ld, ld> pld;
typedef unsigned long long ull;

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vpii;
#define ts to_string
#define sts string ts

sts(string s) { return s; }

sts(bool b) { return b ? "true" : "false"; }

sts(char c) { return string(1, c); }

sts(const char *s) { return (string) s; }

template<class A, class B>
sts(pair<A, B>);

template<class T>
sts(T v) {
    string s = "{", sep = "";
    for (auto x : v) {
        s += sep;
        sep = ", ";
        s += ts(x);
    }
    return s + "}";
}

template<class A, class B>
sts(pair<A, B> p) { return "(" + ts(p.first) + ", " + ts(p.second) + ")"; }

void dbgPrint() { cerr << endl; }

template<class A, class... B>
void dbgPrint(A a, B... b) {
    cerr << ' ' << ts(a);
    dbgPrint(b...);
}

#ifdef LOCAL
#define dbg(...) cerr << "line #" << __LINE__ << " [" << #__VA_ARGS__ << "]:", dbgPrint(__VA_ARGS__)
#else
#define dbg(...)
#endif

#define sz(a) (int) (a).size()
#define len(a) (int) (a).size()
#define all(a) (a).begin(), (a).end()
#define pb push_back
#define eb emplace_back
#define rep(x, y, a) for (int x = (y); x < (int)(a); ++x)
#define asd(n) rep(i, 0, n)
#define jkl(n) rep(j, 0, n)
#define UB upper_bound
#define LB lower_bound
#define mp make_pair
namespace IO {

    template<class A, class B>
    ostream &operator<<(ostream &out, vector<pair<A, B>> a);

    template<class A>
    ostream &operator<<(ostream &out, vector<A> a);

    template<class A, class B>
    ostream &operator<<(ostream &out, pair<A, B> a) {
        out << a.first << " " << a.second;
        return out;
    }

    template<class A, class B>
    ostream &operator<<(ostream &out, vector<pair<A, B>> a) {
        for (pair<A, B> x : a)
            out << x.first << " " << x.second << '\n';
        return out;
    }

    template<class A>
    ostream &operator<<(ostream &out, vector<A> a) {
        for (A x : a) out << x << ' ';
        return out;
    }

    template<class A, class B>
    istream &operator>>(istream &in, pair<A, B> &a) {
        in >> a.first >> a.second;
        return in;
    }

    template<class A>
    istream &operator>>(istream &in, vector<A> &a) {
        for (A &x : a) in >> x;
        return in;
    }
}  // namespace IO

template<class A, class B>
inline int chkmax(A &a, B b) {
    if (a < (A) b) {
        a = (A) b;
        return 1;
    }
    return 0;
}

template<class A, class B>
inline int chkmin(A &a, B b) {
    if (a > (A) b) {
        a = (A) b;
        return 1;
    }
    return 0;
}

using namespace IO;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void solve();

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.precision(41);
    int q = 1;
    // cin >> q;
    while (q--) solve();
}

void solve() {
    int n;
    cin >> n;
    int s = 0;
    int cur = 1;
    while (s < n) {
        s += cur;
        ++cur;
    }
    put(cur - 1);
}




#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#define int long long
#define IOS std::ios::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL);
#define pb push_back
#define mod 1000000007
//#define lld long double
#define mii map<int, int>
#define mci map<char, int>
#define msi map<string, int>
#define pii pair<int, int>
#define ff first
#define ss second
#define bs(yup,x) binary_search(yup.begin(),yup.end(),x) //it will return bollean value
#define lb(yup,x) lower_bound(yup.begin(),yup.end(),x)  //it will return the adress of the number which is equal to or just greater than x ,and if it is equal to yup.end() than their in no such number exist
#define ub(yup,x) upper_bound(yup.begin(),yup.end(),x)
#define all(x) (x).begin(), (x).end()
#define rep(i,x,y) for(int i=x; i<y; i++)
#define fill(a,b) memset(a, b, sizeof(a))
#define vi vector<int>
#define setbits(x) __builtin_popcountll(x)
using namespace std;
const long long N=262144, INF=2000000000000000000;
const long double EPS= 0.000000000001;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> order_set;
 
//order_of_key(x) --> will return number of numbers that are strictly less than x in set
//find_by_order(x) --> will return (x+1)th element in the set
//both are log(n) time
 
int power(int a, int b, int p)
    {
        if(a==0)
        return 0;
        int res=1;
        a%=p;
        while(b>0)
        {
            if(b&1)
            res=(res*a)%p;
            b>>=1;
            a=(a*a)%p;
        }
        return res;
    }
vi prime;
bool isprime[N];
void pre()
{
    for(int i=2;i<N;i++)
    {
        if(isprime[i])
        {
            for(int j=i*i;j<N;j+=i)
            isprime[j]=false;
            prime.pb(i);
        }
    }
    return;
}
/*
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
 
int getRand(int l, int r)
{
    uniform_int_distribution<int> uid(l, r);
    return uid(rng);
}
 */
 
 
int32_t main()
{
    IOS;
    //fill(isprime, true);
    //pre();
    int wertt=1;
    //cin>>wertt;
    for(int pppp=1;pppp<=wertt;pppp++)
    {
        int n;
        cin>>n;
        long double a[n];
        for(int i=0;i<n;i++) cin>>a[i];
        sort(a,a+n);
        long double x=(a[n/2]/2.0);
        long double ans=0;
        for(int i=0;i<n;i++)
        {
            ans+=(x+a[i]-min(x+x,a[i]));
        }
        ans=ans/((long double)(n));
        cout<<fixed << setprecision(15)<<ans;
    }
}

