#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define ull unsigned long long
#define loops(i, s, n) for (ll i = s; i < (ll)n; i++)
#define loop(i, n) loops(i, 0, n)
#define ALL(a) a.begin(), a.end()
#define pub push_back
#define pob pop_back
#define mp make_pair
#define dump(x) cerr << #x << " = " << (x) << endl;

typedef pair<int, int> pi;
typedef pair<ll, ll> pl;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<string> vs;
typedef vector<ll> vl;

// for dp
// 第一引数と第二引数を比較し、第一引数(a)をより大きい/小さい値に上書き
template <typename T>
inline bool chmin(T &a, const T &b)
{
  bool compare = a > b;
  if (a > b)
    a = b;
  return compare;
}
template <typename T>
inline bool chmax(T &a, const T &b)
{
  bool compare = a < b;
  if (a < b)
    a = b;
  return compare;
}

#define in_v(type, name, cnt) \
  vector<type> name(cnt);     \
  loop(i, cnt) cin >> name[i];
#define sort_v(v) std::sort(v.begin(), v.end())
#define unique_v(v) v.erase(std::unique(v.begin(), v.end()), v.end()) //必ずソート後に実行

#define set_fix(x) ((std::cerr << std::fixed << std::setprecision(x)), (std::cout << std::fixed << std::setprecision(x)))

//cout for vector
template <class T>
ostream &operator<<(ostream &o, const vector<T> &v)
{
  o << "{";
  for (int i = 0; i < (int)v.size(); i++)
    o << (i > 0 ? ", " : "") << v[i];
  o << "}";
  return o;
}

// gcd
ll gcd(ll a, ll b)
{
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
ll lcm(ll a, ll b)
{
  return a * b / gcd(a, b);
}

//prime numbers
bool IsPrime(ll num)
{
  if (num < 2)
    return false;
  else if (num == 2)
    return true;
  else if (num % 2 == 0)
    return false;

  double sqrtNum = sqrt(num);
  for (ll i = 3; i <= sqrtNum; i += (ll)2)
  {
    if (num % i == 0)
    {
      return false;
    }
  }
  return true;
}
vector<ll> Eratosthenes(ll N)
{
  int arr[N];
  vector<ll> res;
  for (int i = 0; i < N; i++)
  {
    arr[i] = 1;
  }
  for (int i = 2; i < sqrt(N); i++)
  {
    if (arr[i])
    {
      for (int j = 0; i * (j + 2) < N; j++)
      {
        arr[i * (j + 2)] = 0;
      }
    }
  }

  for (int i = 2; i < N; i++)
  {
    if (arr[i])
    {
      res.push_back(i);
    }
  }
  return res;
}

//digit number
int GetDigit(ll num, ll radix)
{
  unsigned digit = 0;
  while (num != 0)
  {
    num /= radix;
    digit++;
  }
  return digit;
}

int digsum(ll n)
{
  ll res = 0;
  while (n > 0)
  {
    res += n % (ll)10;
    n /= (ll)10;
  }
  return res;
}

int main()
{
  int n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < n; i++)
  {
    cin >> a[i];
  }
  sort(ALL(a));
  dump(a);
  dump(n / 2);
  dump(a[n / 2]);
  ld x = n % 2 == 0 ? (double)(a[n / 2 - 1] + a[n / 2]) / (double)4 : a[n / 2] / (double)2;
  // cout << "x: " << x << endl;
  ld res = 0;
  for (int i = 0; i < n; i++)
  {
    // cout << "res: " << res << endl;
    // cout << "min((double)2 * x, (ld)a[i]): " << min((double)2 * x, (ld)a[i]) << endl;
    // cout << "a[i]: " << a[i] << endl;
    res += x + (double)a[i] - min((double)2 * x, (ld)a[i]);
  }
  set_fix(20) << (double)res / (double)n << endl;

  return 0;
}

#include <iostream>
#include <iomanip>
#include <assert.h>
#include <vector>
#include <string>
#include <cstring>
#include <sstream>

#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <numeric>
#include <cmath>

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef std::pair<long long, long long> Pll;
typedef std::vector<int> vi;
typedef std::vector<long long> vl;
typedef std::vector<std::string> vs;
typedef std::vector<std::pair<long long, long long>> vpll;
typedef std::vector<std::vector<ll>> vvl;
typedef std::vector<std::vector<std::vector<ll>>> vvvl;
template<class T> using V  = std::vector<T>;
template<class T> using VV = std::vector<std::vector<T>>;
template<class T> using PQue  = std::priority_queue<T>;
template<class T> using RPQue = std::priority_queue<T, std::vector<T>, std::greater<T>>;

const long double PI = (acos(-1));
const long long MOD = 1000000007;

static const int MAX_INT = std::numeric_limits<int>::max(); // 2147483647 = 2^31-1
static const ll  MAX_LL  = std::numeric_limits<long long>::max();
static const int INF     = (1 << 29);   // cf) INT_MAX   = 2147483647 = 2^31-1
static const ll  INFLL   = (1ll << 61); // cf) LLONG_MAX = 9223372036854775807 = 2^63 - 1

#define rep(i,n) REP(i,0,n)
#define REP(i,x,n) for(ll i=(ll)(x);i<(ll)(n);++i)
#define rrep(i,n) RREP(i,0,n)
#define RREP(i,x,n) for(ll i=(ll)(n)-1ll;i>=(ll)(x);--i)
#define ALL(x) x.begin(), x.end()
#define RALL(x) x.rbegin(), x.rend()
#define SUM(x) accumulate(ALL(x), 0ll)
#define MAX(x) *max_element(ALL(x))
#define MIN(x) *min_element(ALL(x))
#define debug(var)  do{std::cout << #var << " : ";view(var);}while(0)

                                        // view
template<typename T> void view(T e){std::cout << e << std::endl;}
template<typename T> void view(const std::vector<T>& v){for(const auto& e : v){ std::cout << e << " "; } std::cout << std::endl;}
template<typename T> void view(const std::vector<std::vector<T> >& vv){ for(const auto& v : vv){ view(v); } }

// change min/max
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }

void Main() {

    //ll M; cin >> M;
    //ll K; cin >> K;
    int N = 3;
    vl A(N); rep(i,N) cin >> A[i];
    sort(RALL(A));
    
    ll ans = A[0] + A[1];

    cout << ans << endl;
}

int main() {
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);
    std::cout << std::fixed << std::setprecision(15);
    Main();

    double tmp;
    cin >> tmp;

    return 0;
}
