#include <bits/stdc++.h>
using namespace std;

int main(){

  int n = 0;
  cin >> n;
  
  vector<double> p0(2), p2n(2), pc(2), pc0(2);
  cin >> p0.at(0) >> p0.at(1) >> p2n.at(0) >> p2n.at(1);
  
  double theta = (2.0 * M_PI) / (double)n;
  
  pc.at(0) = (p0.at(0) + p2n.at(0)) / 2;
  pc.at(1) = (p0.at(1) + p2n.at(1)) / 2;
  
  pc0.at(0) = p0.at(0) - pc.at(0);
  pc0.at(1) = p0.at(1) - pc.at(1);
  
  double ans_real = 0.0, ans_imagine = 0.0;
  ans_real = pc0.at(0) * cos(theta) - pc0.at(1) * sin(theta) + pc.at(0);
  ans_imagine = pc0.at(1) * cos(theta) + pc0.at(0) * sin(theta) + pc.at(1);
  
  printf("%0.9f %0.9f", ans_real, ans_imagine);

  return 0;
}//main
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define ll long long
#define ld long double
#define rep(i,n) for (ll i = 0;i<(n);++i)
#define all(v) v.begin(),v.end()

template <typename T>bool chmax(T &a, const T& b) {if (a < b) {a = b;return true;}return false;}
template <typename T>bool chmin(T &a, const T& b) {if (a > b) {a = b;return true;}return false;}
vector<long long> divisor(long long n){vector<long long> res;long long i = 1;while (i*i<=n){if(n%i==0){res.push_back(i);}i++;}if(res.size()==0)return res;for(long long i = res.size()-1-(res.back()*res.back()==n);i>=0;--i){res.push_back(n/res[i]);}return res;}
long long safe_mod(long long x,long long m){x%=m;if(x<0){x+=m;}return x;}
long long modpow(long long x,long long n,long long mod){long long ans=1;while(n>0){if(n&1){ans*=x;ans%=mod;}n>>=1;x*=x;x%=mod;}return ans;}
long long intpow(long long x,long long n){long long ans=1;while(n>0){if(n&1){ans*=x;}n>>=1;x*=x;}return ans;}
//template<typename T>T intpow(T x,T n){T ans=1;while(n>0){if(n&1){ans*=x;}n>>=1;x*=x;}return ans;}
vector<pair<long long,long long>> factor_lst(long long n){vector<pair<long long,long long>> factor_lst;long long d=2;while(d*d<=n){if(n%d==0){long long num=0;while(n%d==0){num+=1;n/=d;}factor_lst.push_back({d,num});}d+=1;}if(n!=1){factor_lst.push_back({n,1});}return factor_lst;}
#define Uniq(a) sort(all(a));a.erase(unique(all(a)),end(a))


int msb(int x){return x==0 ? -1:32-__builtin_clz(x);}//1-indexed
int lsb(int x){return x==0 ? 32:__builtin_ctz(x)+1;}//1-indexed
int popcnt(int x){return __builtin_popcount(x);}
int popcnt(long long x){return __builtin_popcount(x);}

bool ingrid(int i,int j,int H,int W){
    return 0<=i&&i<H&&0<=j&&j<W;
}

const int dx[]={1,0,-1,0};
const int dy[]={0,1,0,-1};
template<typename T> void print(vector<T> &v){for(int i=0;i<v.size();++i){if(i)cout<<" ";cout<<v[i];}cout<<endl;} 
template<typename T> void print(T* v,int size){for(int i=0;i<size;++i){if(i)cout<<" ";cout<<v[i];}cout<<endl;}
template<typename T,typename S>void print(pair<T,S>&p){cout<<p.first<<" "<<p.second<<endl;}
const ll LINF=4*1e18;
const ll MINF=5*1e15;
const int INF=1e9+5;
const ld PI=acosl(-1);
const ld DINF=INF;

void Main();
int main(){cout<<fixed<<setprecision(15);Main();}

void Main(){

int N;cin>>N;
vector<int> A(N);
rep(i,N)cin>>A[i];
int ans=0;
rep(i,N)ans+=max(A[i],10)-10;
cout<<ans<<endl;

}
