#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
using ll = long long;
const long long INF = 1LL << 60;
const int SINF = 1LL << 30;
const ll mod = 1000000000+7;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

const double pi = 3.14159265358979323846;
pair<double, double> rotate(double x, double y, double d) {
    double rx = x * cos(d) - y*sin(d);
    double ry = x * sin(d) + y*cos(d);
    return make_pair(rx, ry);
}

int main() {
    int n;
    cin >> n;
    double x0, y0, xn2, yn2;
    cin >> x0 >> y0 >> xn2 >> yn2;
    double xm = (x0+xn2)/2;
    double ym = (y0+yn2)/2;

    pair<double, double> ans = rotate(x0-xm, y0-ym, 2*pi/n);
    printf("%.20f %.20f\n", ans.first + xm, ans.second + ym);
}
#include <iostream>
#include <cstdio>
#include <cmath>
#include <ctime>
#include <cstdlib>
#include <cassert>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <string>
#include <algorithm>
#include <utility>
#include <complex>
#define rep(x, s, t) for(llint (x) = (s); (x) <= (t); (x)++)
#define reps(x, s) for(llint (x) = 0; (x) < (llint)(s).size()-1; (x)++)
#define chmin(x, y) (x) = min((x), (y))
#define chmax(x, y) (x) = max((x), (y))
#define all(x) (x).begin(),(x).end()
#define outl(x) cout << x << endl
#define SP << " " << 
#define inf 1e18

using namespace std;

typedef long long llint;
typedef long long ll;
typedef pair<llint, llint> P;

string X, Y, R;

ll get(string s)
{
	ll p = -1;
	rep(i, 0, (int)s.size()-1){
		if(s[i] == '.'){
			p = i;
			break;
		}
	}
	if(p == -1) s += '.', p = (int)s.size()-1;
	
	
	ll l = s.size();
	rep(i, 1, 4-(l-1 - p)) s += '0';
	
	ll ret = 0;
	rep(i, 0, (int)s.size()-1){
		if(s[i] == '.') continue;
		ret *= 10;
		ret += s[i]-'0';
	}
	return ret;
}

bool check(ll sx, ll sy, ll tx, ll ty, ll r)
{
	//outl(sx SP sy SP tx SP ty SP r);
	//cout << ((sx-tx)*(sx-tx) + (sy-ty)*(sy-ty) <= r*r) << endl;
	return (sx-tx)*(sx-tx) + (sy-ty)*(sy-ty) <= r*r;
}

int main(void)
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	cin >> X >> Y >> R;
	ll x = get(X), y = get(Y), r = get(R);
	
	//cout << x << " " << y << " " << r << endl;
	
	ll s = (x-r)/10000 - 5, t = (x+r)/10000 + 5, ans = 0;
	rep(i, s, t){
		if(!check(i*10000, y, x, y, r)) continue;
		
		ll uy = (y + 10000000000 + 9999) / 10000 * 10000 - 10000000000;
		ll dy = (y + 10000000000) / 10000 * 10000 - 10000000000;
		
		if(uy == dy && abs(y) % 10000 == 0) ans--;
		
		ll ub = r / 10000 + 5, lb = 0, mid;
		while(ub-lb>1){
			mid = (ub+lb)/2;
			if(check(i*10000, uy+(mid-1)*10000, x, y, r)) lb = mid;
			else ub = mid;
		}
		//cout << lb << endl;
		ans += lb;
		
		ub = r / 10000 + 5, lb = 0, mid;
		while(ub-lb>1){
			mid = (ub+lb)/2;
			if(check(i*10000, dy-(mid-1)*10000, x, y, r)) lb = mid;
			else ub = mid;
		}
		ans += lb;
		
		//cout << i << " " << ans << endl;
	}
	cout << ans << endl;
	
	return 0;
}