#define _USE_MATH_DEFINES
#include "bits/stdc++.h"
using namespace std;
#define FOR(i,j,k) for(int (i)=(j);(i)<(int)(k);++(i))
#define rep(i,j) FOR(i,0,j)
#define each(x,y) for(auto &(x):(y))
#define mp make_pair
#define MT make_tuple
#define all(x) (x).begin(),(x).end()
#define debug(x) cout<<#x<<": "<<(x)<<endl
#define smax(x,y) (x)=max((x),(y))
#define smin(x,y) (x)=min((x),(y))
#define MEM(x,y) memset((x),(y),sizeof (x))
#define sz(x) (int)(x).size()
#define RT return
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vll = vector<ll>;

class UnionFind {
    int cnt;
    vector<int> par, rank, size;
public:
    UnionFind() {}
    UnionFind(int _n) :cnt(_n), par(_n), rank(_n), size(_n, 1) {
        for (int i = 0; i<_n; ++i) par[i] = i;
    }
    int find(int k) {
        return (k == par[k]) ? k : (par[k] = find(par[k]));
    }
    int operator[](int k) {
        return find(k);
    }
    int getSize(int k) {
        return size[find(k)];
    }
    void unite(int x, int y) {
        x = find(x); y = find(y);
        if (x == y) return;
        --cnt;
        if (rank[x] < rank[y]) {
            par[x] = y;
            size[y] += size[x];
        } else {
            par[y] = x;
            size[x] += size[y];
            if (rank[y] == rank[x]) ++rank[x];
        }
    }
    int count() {
        return cnt;
    }
};

void solve() {
    int N;
    cin >> N;
    vi X(N), Y(N);
    rep(i, N) cin >> X[i] >> Y[i];
    double ng = 100, ok = 0;
    rep(ITER, 60) {
        UnionFind uf(N + 2);
        double r = (ng + ok) / 2;
        rep(i, N) {
            if (100 - Y[i] < 2 * r)uf.unite(i, N);
            if (Y[i] + 100 < 2 * r)uf.unite(i, N + 1);
            rep(j, i) {
                if (hypot(X[i] - X[j], Y[i] - Y[j]) < 2 * r) {
                    uf.unite(i, j);
                }
            }
        }
        (uf[N] == uf[N + 1] ? ng : ok) = r;
    }
    cout << ok << endl;
}

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout << fixed << setprecision(15);
	solve();
	return 0;
}

#include <bits/stdc++.h>

using namespace std;

using int64 = long long;
const int mod = 1e9 + 7;
// const int mod = 998244353;

const int64 infll = (1LL << 62) - 1;
const int inf = (1 << 30) - 1;

struct IoSetup {
  IoSetup() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);
    cerr << fixed << setprecision(10);
  }
} iosetup;

template< typename T1, typename T2 >
ostream &operator<<(ostream &os, const pair< T1, T2 > &p) {
  os << p.first << " " << p.second;
  return os;
}

template< typename T1, typename T2 >
istream &operator>>(istream &is, pair< T1, T2 > &p) {
  is >> p.first >> p.second;
  return is;
}

template< typename T >
ostream &operator<<(ostream &os, const vector< T > &v) {
  for(int i = 0; i < (int) v.size(); i++) {
    os << v[i] << (i + 1 != v.size() ? " " : "");
  }
  return os;
}

template< typename T >
istream &operator>>(istream &is, vector< T > &v) {
  for(T &in : v) is >> in;
  return is;
}

template< typename T1, typename T2 >
inline bool chmax(T1 &a, T2 b) { return a < b && (a = b, true); }

template< typename T1, typename T2 >
inline bool chmin(T1 &a, T2 b) { return a > b && (a = b, true); }

template< typename T = int64 >
vector< T > make_v(size_t a) {
  return vector< T >(a);
}

template< typename T, typename... Ts >
auto make_v(size_t a, Ts... ts) {
  return vector< decltype(make_v< T >(ts...)) >(a, make_v< T >(ts...));
}

template< typename T, typename V >
typename enable_if< is_class< T >::value == 0 >::type fill_v(T &t, const V &v) {
  t = v;
}

template< typename T, typename V >
typename enable_if< is_class< T >::value != 0 >::type fill_v(T &t, const V &v) {
  for(auto &e : t) fill_v(e, v);
}

template< typename F >
struct FixPoint : F {
  FixPoint(F &&f) : F(forward< F >(f)) {}

  template< typename... Args >
  decltype(auto) operator()(Args &&... args) const {
    return F::operator()(*this, forward< Args >(args)...);
  }
};

template< typename F >
inline decltype(auto) MFP(F &&f) {
  return FixPoint< F >{forward< F >(f)};
}

/**
 * @brief Union-Find
 * @docs docs/union-find.md
 */
struct UnionFind {
  vector< int > data;

  UnionFind() = default;

  explicit UnionFind(size_t sz) : data(sz, -1) {}

  bool unite(int x, int y) {
    x = find(x), y = find(y);
    if(x == y) return false;
    if(data[x] > data[y]) swap(x, y);
    data[x] += data[y];
    data[y] = x;
    return true;
  }

  int find(int k) {
    if(data[k] < 0) return (k);
    return data[k] = find(data[k]);
  }

  int size(int k) {
    return -data[find(k)];
  }

  bool same(int x, int y) {
    return find(x) == find(y);
  }
};

int main() {
  int N;
  cin >> N;
  vector< int > X(N), Y(N);
  for(int i = 0; i < N; i++) {
    cin >> X[i] >> Y[i];
  }
  vector< tuple< double, int, int > > es;
  for(int i = 0; i < N; i++) {
    for(int j = 0; j < i; j++) {
      es.emplace_back(hypot(X[i] - X[j], Y[i] - Y[j]), i, j);
    }
    es.emplace_back(100 - Y[i], i, N);
    es.emplace_back(Y[i] + 100, i, N + 1);
  }
  sort(es.begin(), es.end());
  UnionFind uf(N + 2);
  for(auto[dist, x, y]:es) {
    uf.unite(x, y);
    if(uf.find(N) == uf.find(N + 1)) {
      cout << dist / 2 << "\n";
      return 0;
    }
  }
}


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

typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;

#define fastio() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define test() int t;cin>>t;for(int test=1;test<=t;test++)
#define pb push_back
#define nl cout<<"\n"
#define all(x) x.begin(),x.end()

template<class C> void min_self( C &a, C b ){ a = min(a,b); }
template<class C> void max_self( C &a, C b ){ a = max(a,b); }

const ll MOD = 1000000007;
ll mod( ll n, ll m=MOD ){ n%=m,n+=m,n%=m;return n; }

const int MAXN = 1e5+5;
const int LOGN = 21;
const ll INF = 1e14;
int dx[] = {1,0,-1,0};
int dy[] = {0,1,0,-1};

template<class T1, class T2> void add( T1 &x, T2 y, ll m = MOD )
{
    x += y;
    if( x >= m )
        x -= m;
}

template<class T1, class T2> void sub( T1 &x, T2 y, ll m = MOD )
{
    x -= y;
    if( x < 0 )
        x += m;
}

ld dp[102][102][102];
int vis[102][102][102];
ld solve( int a, int b, int c )
{
    if( a == 100 || b == 100 || c == 100 )
        return 0;

    if( vis[a][b][c] != 0 )
        return dp[a][b][c];

    vis[a][b][c] = 1;
    ld go = 1.0/(a+b+c);

    ld ans = 1;

    ans += (1.0*a*go) * solve(a+1,b,c);
    ans += (1.0*b*go) * solve(a,b+1,c);
    ans += (1.0*c*go) * solve(a,b,c+1);

    return dp[a][b][c] = ans;
}

int main()
{
    #ifdef gupta_samarth
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
    fastio();

    memset(vis,0,sizeof(vis));

    int a,b,c;
    cin>>a>>b>>c;
    cout<<fixed<<setprecision(9)<<solve(a,b,c);

    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
    return 0;
}

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

typedef long long ll;
typedef long double ld;
#define FOR(i, a, b) for (int i = a; i < (b); i++)
#define range(a) a.begin(), a.end()
#define endl "\n"
#define Yes() cout << "Yes" << endl
#define No() cout << "No" << endl
#define MP make_pair
using P = pair<int, int>;
const long long INF = 1LL<<60;
void chmin(long long &a, long long b) { if (a > b) a = b; }
void chmax(long long &a, long long b) { if (a < b) a = b; }

const int64_t CYCLES_PER_SEC = 2800000000;

struct Timer {
	int64_t start;
	Timer() { reset(); }
	void reset() { start = getCycle(); }
	void plus(double a) { start -= (a * CYCLES_PER_SEC); }
	inline double get() { return (double)(getCycle() - start) / CYCLES_PER_SEC; }
	inline int64_t getCycle() {
		uint32_t low, high;
		__asm__ volatile ("rdtsc" : "=a" (low), "=d" (high));
		return ((int64_t)low) | ((int64_t)high << 32);
	}
};

Timer timer;

unsigned long xor128() {
	static unsigned long x = 123456789, y = 362436069, z = 521288629, w = 88675123;
	unsigned long t = (x^(x << 11));
	x = y;
	y = z;
	z = w;
	return (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)));
}

// 0以上1未満の小数をとる乱数
static double rand01(){
	double ans = ((xor128() + 0.5)  * (1.0 / 9223372036854775807));
	return ans / 2;
}

int main(void){
	ios::sync_with_stdio(0);
	cin.tie(0);
	timer.reset();
	double TIMELIMIT = 2.8;
	//double ti = timer.get();
	int N, M;
	cin >> N >> M;
	map<int, vector<string>> mp;
	vector<vector<char>> ans(N, vector<char>(20, '.'));
	int nowx = 0, nowy = 0;
	set<int> length;
	FOR(i,0,M){
		string s;
		cin >> s;
		mp[(int)s.size()].push_back(s);
		length.insert((int)s.size());
	}

	for (auto itr = length.begin(); itr != length.end(); itr++){
		FOR(i,0,(int)mp[*itr].size()){
			string s = mp[*itr][i];
			if(nowx >= N-1 && nowy + *itr >= N){
				char c = 'A';
				for(auto x: ans){
					for(auto y: x){
						if(y == '.')	cout << c++;
						else	cout << y;
						if(c == 'I')	c = 'A';
					}
					cout << endl;
				}
				return 0;
			}
			FOR(k,0,(int)s.size()){
				if(nowy >= 20){nowy = 0; nowx++;}
				ans[nowx][nowy++] = s[k];
			}
		}
	}

		return 0;
}


#include "bits/stdc++.h"

#include "ext/pb_ds/assoc_container.hpp"
#include "ext/pb_ds/tree_policy.hpp"
#define ordered_set tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag, tree_order_statistics_node_update>
using namespace __gnu_pbds;
#define int long long int
using namespace std;
#define pb push_back
#define vec vector<int>
#define fo(i, n) for (int i = 0; i < n; i++)
#define foo(i, a, b) for (int i = a; i < b; i++)
//#define mp make_pair
#define ll long long
#define mod 1000000007
//#define mod 998244353
#define so(v) sort(v.begin(), v.end())
#define fi first
#define se second

void __print(long x)
{
    cerr << x;
}
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }

template <typename T, typename V>
void __print(const pair<T, V> &x)
{
    cerr << '{';
    __print(x.first);
    cerr << ',';
    __print(x.second);
    cerr << '}';
}
template <typename T>
void __print(const T &x)
{
    int f = 0;
    cerr << '{';
    for (auto &i : x)
        cerr << (f++ ? "," : ""), __print(i);
    cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v)
{
    __print(t);
    if (sizeof...(v))
        cerr << ", ";
    _print(v...);
}
#ifndef ONLINE_JUDGE
#define debug(x...)               \
    cerr << "[" << #x << "] = ["; \
    _print(x)
#else
#define debug(x...)
#endif
//__builtin_popcount
//vector<vector<int>>
//     dir = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}, {1, 1}, {1, -1}, {-1, 1}, {-1, -1}};
#define mp make_pair
int power(int x, unsigned int y, int p)
{
    int res = 1;
    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res * x) % p;
        y = y >> 1;
        x = (x * x) % p;
    }
    return res;
}
int mI(int a, int m)
{
    return power(a, m - 2, m);
}

#define double long double
int n;
vec v;
int mul(int i,int j){
    return (i * j) % mod;
}
int add(int i,int j){
    return (i + j) % mod;
}
int sub(int i,int j){
    int ans =(i - j) % mod;
    if(ans<0)
        ans += mod;
    return ans;
}

vector<vector<pair<int, int>>> dp(100005);
pair<int,int> fun(int i,int j){

    // debug(i, j);
    if(i==n-1)
        return mp(0,1);
    if(dp[i][j].se!=-1)
        return dp[i][j];
    pair<int,int> ans;
    pair<int, int> x, y;
    y = mp(0, 0);
    x = fun(i + 1, 1);
    if(j==1){
        y = fun(i + 1, 0);
    }
    ans.fi = add(add(x.fi , y.fi) , mul(sub(x.se , y.se) , v[i + 1]));
    ans.se = add(x.se , y.se);

    return dp[i][j]=ans;
}
void solve()
{
    fo(i,100005){
        dp[i].resize(2, {-1, -1});
    }

    cin >> n;
    v.resize(n);
    fo(i, n) cin >> v[i];
    pair<int,int> ans = fun(0, 1);
    int ans1 = add(mul(ans.se, v[0]), ans.fi);
    cout << ans1;
}

int32_t main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    srand(time(0));
    //initfact();
    int t = 1;
    //cin >> t;

    while (t--)
    {
        solve();
    }
}

#include<bits/stdc++.h>
#define pll pair<ll, ll>
#define fi first
#define se second
#define pb push_back
#define task "nondec"
#define pii pair<pll, ll>
using namespace std;
using ll = long long;
const int  N = 1e5+5;
const ll mod = 1e9 + 7;
const ll base = 350;
const ll cs = 331;
ll m, n, t, k, tong, ans, a[N], b[N], fe[N], c[N], d[N];
vector<ll> adj[N];
vector<ll> kq;
ll pw(ll k, ll n)
{
    ll total = 1;
    for(; n; n >>= 1)
    {
        if(n & 1)total = total * k % mod;
        k = k * k % mod;
    }
    return total;
}
void add(ll& x, ll y)
{
    x += y;
    if(x >= mod)x -= mod;
}

void sol()
{
    cin >> n;
    b[1] = 1;
    c[1] = 1;
    d[1] = 2;
    c[0] = 1;
    d[0] = 1;
    for(int i = 1; i <= n; i ++)
    {
        cin >> a[i];
        if(i > 1)
        {
            b[i] = d[i-2];
            c[i] = b[i-1] + c[i-1];
            if(b[i] >= mod)b[i] -= mod;
            if(c[i] >= mod)c[i] -= mod;
            d[i] = b[i] + c[i];
            if(d[i] >= mod)d[i] -= mod;
            //cout << b[i] <<" "<<c[i] << '\n';
        }
    }
    ans = a[1] * d[n-1] % mod;
    for(int i = 2; i <= n; i ++)
    {
        ans = (ans + a[i] * d[i-2] % mod * d[n-i] % mod) % mod;
        ans = (ans - a[i] * c[i-2] % mod * c[n-i] % mod + mod) % mod;
        //cout << d[i-2] * d[n-i] % mod <<" "<<c[n-i] * c[i-2] % mod << '\n';
    }
    cout << ans;
}
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    if(fopen(task".in", "r"))
    {
        freopen(task".in", "r", stdin);
        freopen(task".out", "w", stdout);
    }
    int ntest = 1;
    //cin >> ntest;
    while(ntest -- > 0)
    sol();
}
/*
4 3
3 2 1 1
2
1 2
3 4
*/


#include<bits/stdc++.h>
#define rep(i, n) for (int i = 0, length = n; i < length; i++)
#define fi first
#define se second
#define lb lower_bound
#define ub upper_bound
#define ep emplace
#define epb emplace_back
#define scll static_cast<long long>
#define sz(x) static_cast<int>((x).size())
#define pfll(x) printf("%lld\n", x)
#define ci(x) cin >> x
#define ci2(x, y) cin >> x >> y
#define ci3(x, y, z) cin >> x >> y >> z
#define ci4(x, y, z) cin >> w >> x >> y >> z
#define co(x) cout << x << endl
#define co2(x, y) cout << x << " " << y << endl
#define co3(x, y, z) cout << x << " " << y << " " << z << endl
using namespace std;
typedef long long ll;
typedef pair<double, double> PL;

const int MAX_N = 2e5, MOD = 1e9 + 7, INF = 1e9, DIG = 50;
int n, m, k;
set<int> a;
PL bit[MAX_N + 1][DIG + 1];
double divi[DIG + 1];

PL sum(int i, int d) {
    ll fi = 0, se = 0;
    while (i > 0) {
        fi += bit[i][d].fi;
        se += bit[i][d].se;
        i -= i & -i;
    }
    return PL(fi, se);
}

void add(int i, int d, ll x, ll y) {
    while (i <= n) {
        bit[i][d].fi += x;
        bit[i][d].se += y;
        i += i & -i;
    }
}

int main() {
    ci3(n, m, k);
    rep(i, k) {
        int tmp;
        ci(tmp);
        a.ep(tmp);
    }
    rep(i, n) {
        if (a.find(i) != a.end()) continue;
        rep (j, DIG) {
            PL p = (i == 0 && j == 0) ? PL(0, 1) : sum(i, j);
            ll x = p.fi + p.se, y = p.se;
            add(i + 1, j, x / m, y / m);
            add(i + 1, j + 1, x % m, y % m);
            if (i + m + 1 <= n) {
                add(i + m + 1, j, -x / m , -y / m);
                add(i + m + 1, j + 1, -x % m , -y % m);
            }
            else {
                add(n, j, x * (i + m - n) / m, y * (i + m - n) / m);
                add(n, j + 1, x * (i + m - n) % m, y * (i + m - n) % m);
            }
        }
    }

    divi[0] = 1.0;
    rep(i, DIG) divi[i + 1] = divi[i] / m;

    ll coe[DIG + 1], ans[DIG + 1];
    coe[0] = 1.0;
    fill(coe + 1, coe + DIG + 2, 0.0);
    rep(i, DIG + 1) ans[i] = sum(n, i).fi;
    double jdg = 0.0;
    rep(i, DIG + 1) jdg += ans[DIG - i] * divi[DIG - i];
    if (abs(jdg) < 1e-10) {
        co(-1);
        return 0;
    }

    for (auto &i : a) {
        rep(j, DIG + 1) {
            PL tmp = sum(i, j);
            ans[j] += tmp.fi;
            coe[j] -= tmp.se;
        }
    }
    double res1 = 0.0, res2 = 0.0;
    rep(i, DIG + 1) {
        res1 += ans[DIG - i] * divi[DIG - i];
        res2 += coe[DIG - i] * divi[DIG - i];
    }
    co(res1 / res2);
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5;
const double eps = 1e-6;
int send[maxn];
double k[maxn], b[maxn], sumk = 0.0, sumb = 0.0;
int main() {
    int N, M, K;
    scanf("%d %d %d", &N, &M, &K);
    int x;
    for (int i = 0; i < K; i++) {
        scanf("%d", &x);
        send[x] = 1;
    }
    for (int i = N - 1; i >= 0; i--) {
        if (send[i]) {
            k[i] = 1;
            b[i] = 0;
        }
        else {
            k[i] = sumk / M;
            b[i] = sumb / M + 1;
        }
        sumk -= k[i + M];
        sumk += k[i];
        sumb -= b[i + M];
        sumb += b[i];
    }
    if (fabs(k[0] - 1.0) <= eps) {
        printf("-1\n");
    }
    else {
        printf("%.4f\n", b[0] / (1.0 - k[0]));
    }
    return 0;
}


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

double n, D, H;
double slope(int d, int h) { return (H - h) / (D - d); }

double solve() {
    cin >> n >> D >> H;
    double min_slope = 1e18;
    while (n--) {
        int h, d;
        cin >> d >> h;
        min_slope = min(min_slope, slope(d, h));
    }
    return max(H - min_slope * D, 0.0);
}

signed main() {
    ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
#endif
    int T = 1;
    // cin >> T;
    for (int i = 1; i <= T; i++) {
        cout << fixed << setprecision(10) << solve();
        // solve();
    }
}

//@formatter:off
#include<bits/stdc++.h>
#define overload4(_1,_2,_3,_4,name,...) name
#define rep1(i,n) for (ll i = 0; i < ll(n); ++i)
#define rep2(i,s,n) for (ll i = ll(s); i < ll(n); ++i)
#define rep3(i,s,n,d) for(ll i = ll(s); i < ll(n); i+=d)
#define rep(...) overload4(__VA_ARGS__,rep3,rep2,rep1)(__VA_ARGS__)
#define rrep1(i,n) for (ll i = ll(n)-1; i >= 0; i--)
#define rrep2(i,n,t) for (ll i = ll(n)-1; i >= (ll)t; i--)
#define rrep3(i,n,t,d) for (ll i = ll(n)-1; i >= (ll)t; i-=d)
#define rrep(...) overload4(__VA_ARGS__,rrep3,rrep2,rrep1)(__VA_ARGS__)
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define popcount(x) __builtin_popcountll(x)
#define pb push_back
#define eb emplace_back
#ifdef __LOCAL
#define debug(...) { cout << #__VA_ARGS__; cout << ": "; print(__VA_ARGS__); cout << flush; }
#else
#define debug(...) void(0)
#endif
#define INT(...) int __VA_ARGS__;scan(__VA_ARGS__)
#define LL(...) ll __VA_ARGS__;scan(__VA_ARGS__)
#define STR(...) string __VA_ARGS__;scan(__VA_ARGS__)
#define CHR(...) char __VA_ARGS__;scan(__VA_ARGS__)
#define DBL(...) double __VA_ARGS__;scan(__VA_ARGS__)
#define LD(...) ld __VA_ARGS__;scan(__VA_ARGS__)
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int,int>;
using LP = pair<ll,ll>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using vd = vector<double>;
using vvd = vector<vector<double>>;
using vs = vector<string>;
using vc = vector<char>;
using vvc = vector<vector<char>>;
using vb = vector<bool>;
using vvb = vector<vector<bool>>;
using vp = vector<P>;
using vvp = vector<vector<P>>;
template<class S,class T> istream& operator>>(istream &is,pair<S,T> &p) { return is >> p.first >> p.second; }
template<class S,class T> ostream& operator<<(ostream &os,const pair<S,T> &p) { return os<<'{'<<p.first<<","<<p.second<<'}'; }
template<class T> istream& operator>>(istream &is,vector<T> &v) { for(T &t:v){is>>t;} return is; }
template<class T> ostream& operator<<(ostream &os,const vector<T> &v) { os<<'[';rep(i,v.size())os<<v[i]<<(i==int(v.size()-1)?"":","); return os<<']'; }
template<class T> void vecout(const vector<T> &v,char div='\n') { rep(i,v.size()) cout<<v[i]<<(i==int(v.size()-1)?'\n':div);}
template<class T> bool chmin(T& a,T b) {if(a > b){a = b; return true;} return false;}
template<class T> bool chmax(T& a,T b) {if(a < b){a = b; return true;} return false;}
void scan(){}
template <class Head, class... Tail> void scan(Head& head, Tail&... tail){ cin >> head; scan(tail...); }
template<class T> void print(const T& t){ cout << t << '\n'; }
template <class Head, class... Tail> void print(const Head& head, const Tail&... tail){ cout<<head<<' '; print(tail...); }
template<class... T> void fin(const T&... a) { print(a...); exit(0); }
struct Init_io {
    Init_io() {
        ios::sync_with_stdio(false);
        cin.tie(nullptr);
        cout.tie(nullptr);
        cout << boolalpha << fixed << setprecision(15);
    }
} init_io;
const string yes[] = {"no","yes"};
const string Yes[] = {"No","Yes"};
const string YES[] = {"NO","YES"};
const int inf = 1001001001;
const ll linf = 1001001001001001001;
//@formatter:on

int main() {
    LL(r, x, y);
    ll l = x * x + y * y;
    if (l < r * r) fin(2);
    r *= r;
    ll ok = inf, ng = 0;
    auto f = [&](ll x) -> bool {
        if (x * x > linf / r) return true;
        return l <= x * x * r;
    };
    while (abs(ok - ng) > 1) {
        ll mid = (ng + ok) / 2;
        if (f(mid)) ok = mid;
        else ng = mid;
    }
    fin(ok);
}


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

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    long double A, B;
    cin >> A >> B;

    cout << fixed << setprecision(5) << 100.0 * (1.0 - B / A);

    return 0;
}

#include <bits/stdc++.h>
#define rep(i, n)	for(int i=0;i<(int)(n);i++)
#define ALL(a)	(a).begin(),(a).end()
using namespace std;
using ll=long long;
typedef pair<int,int> P;

int main(){
    ll b,c;
    cin>>b>>c;
    ll l1,r1,l2,r2;
    l1=b-c/2;
    r1=b+(c-2)/2;
    l2=-b-(c-1)/2;
    r2=-b+(c-1)/2;

    ll ans=0;
    //cout<<r1<<" "<<l1<<" "<<r2<<" "<<l2<<endl;
    if((r1>=r2&&l1<=r2)||(r2>=r1&&l2<=r1)) ans=max(r1,r2)-min(l1,l2)+1;
    else ans=(r1-l1+1)+(r2-l2+1);
    cout<<ans<<endl;
}


#include <bits/stdc++.h>
using namespace std;
#define mp(a, b) make_pair(a, b)
typedef pair<int, int> pii;
typedef long long ll;
const int maxn = 2e5 + 10;
const ll INF = 1e18;
ll sum;
ll g[2], f[maxn];
int n, a[maxn], b[maxn];
vector<ll> o, e;
int main()
{
	scanf("%d", &n);
	for(int i = 1; i <= n; ++i)
	{
		scanf("%d", &a[i]);
		sum += a[i];
	}
	for(int i = 1; i <= n; ++i)
	{
		scanf("%d", &b[i]);
		b[i] -= a[i];
	}
	for(int i = 1; i <= n; i += 2) o.push_back(b[i]);
	for(int i = 2; i <= n; i += 2) e.push_back(b[i]);
	sort(o.begin(), o.end(), greater<ll>());
	sort(e.begin(), e.end(), greater<ll>());
	for(int i = 0; i < o.size(); ++i)
	{
		if(o[i] + e[i] > 0)
			sum += o[i] + e[i];
		else
			break;
	}
	printf("%lld\n", sum);
	return 0;
}
/*
2
-2 0
0 -1
*/

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

typedef long long ll;
#define REP(i,n) for(int i=0,_n=(int)(n);i<_n;++i)
#define ALL(v) (v).begin(),(v).end()
#define CLR(t,v) memset(t,(v),sizeof(t))
template<class T1,class T2>ostream& operator<<(ostream& os,const pair<T1,T2>&a){return os<<"("<<a.first<<","<<a.second<< ")";}
template<class T>void chmin(T&a,const T&b){if(a>b)a=b;}
template<class T>void chmax(T&a,const T&b){if(a<b)a=b;}
#ifdef LOCAL
template<class T>void pv(T a,T b){for(T i=a;i!=b;++i)cerr<<(*i)<<" ";cerr<<endl;}
#else
template<class T>void pv(T a,T b){}
#endif

ll nextLong() { ll x; scanf("%lld", &x); return x;}

const ll INF = 1LL << 61;
const int MAX_N = 112345;
ll dp[MAX_N][3];

int main2() {

  int N = nextLong();
  vector<ll> A(N), B(N);
  REP(i, N) A[i] = nextLong();
  REP(i, N) B[i] = nextLong();

  ll s = accumulate(ALL(A), 0LL);

  vector<ll> c0, c1;
  REP(i, N) {
    if (i % 2 == 0) c0.push_back(B[i] - A[i]);
    if (i % 2 == 1) c1.push_back(B[i] - A[i]);
  }
  sort(ALL(c0)); reverse(ALL(c0));
  sort(ALL(c1)); reverse(ALL(c1));

  ll ans = s;
  REP(i, c0.size()) {
    ll gain = c0[i] + c1[i];
    if (gain > 0) ans += gain;
    else break;
  }

  cout << ans << endl;
  return 0;
}

int main() {

#ifdef LOCAL
  for (;!cin.eof();cin>>ws)
#endif
    main2();
  return 0;
}


#include <iostream>
#include <vector>

using namespace std;
typedef long long ll;

int main(){
    int n;
    cin >> n;
    vector<int> a(200,0);
    for(int i = 0; i < n; i++){
        int tmp;
        cin >> tmp;
        a[tmp%200] += 1;
    }
    ll ans = 0;
    for(int i = 0; i < 200; i++){
        ans += ((ll)a[i]*a[i]-a[i])/2;
    }
    cout << ans << endl;
}

#include "bits/stdc++.h"
using namespace std;
#define mod 1000000007
#define pie  3.14159265
#define ll long long int
#define fr(i,a,n) for(ll i=a;i<n;i++)
#define vi vector<int>
#define vlli vector<ll>
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define fv(i,a) for(auto i:a)
#define sz(a) int((a).size())
#define all(c) (c).begin(),(c).end()
#define frv(i,c) for(auto i = c.begin(); i != c.end(); i++)

void solve()
{
	vlli vis(200, 0);
	ll n;
	cin >> n;
	fr(i, 0, n)
	{
		ll x;
		cin >> x;
		vis[x % 200]++;
	}
	ll ans = 0;
	fr(i, 0, 200)
	{
		ans += max((vis[i] * 1LL * (vis[i] - 1)) / 2, 0LL);
	}
	cout << ans << endl;
}

int main() {
//#ifndef ONLINE_JUDGE
#ifdef yogi23
	freopen("input.txt", "r", stdin);
	freopen ("output.txt", "w", stdout);
#endif
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int t;
	t = 1;
	//cin >> t;
	while (t--)
	{
		solve();
	}

	return 0;
}


//Think simple yet elegant.
#include <bits/stdc++.h>
using namespace std;
#define fast ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll  long long
#define all(v) v.begin(),v.end()
#define F first
#define S second
#define pb push_back
#define mp make_pair
#define pi pair<int,int>
#define REP(i,n) for(int i=0;i<n;i++)
#define deb(...) [](const auto&...x){ char c='='; cerr<<#__VA_ARGS__<<" "; ((cerr<<exchange(c,',')<<" "<<x),...); cerr<<"\n"; }(__VA_ARGS__);
const int mx = 1e6+10;
const int INF = 1e9;
vector<int> mu(mx+10);
#define N 1000010

ll lpf[N], mobius[N];

// Function to calculate least
// prime factor of each number
void least_prime_factor()
{
    for (ll i = 2; i < N; i++)

        // If it is a prime number
        if (!lpf[i])

            for (ll j = i; j < N; j += i)

                // For all multiples which are not
                // visited yet.
                if (!lpf[j])
                    lpf[j] = i;
}

// Function to find the value of Mobius function
// for all the numbers from 1 to n
void Mobius()
{
    for (ll i = 1; i < N; i++) {

        // If number is one
        if (i == 1)
            mobius[i] = 1;
        else {

            // If number has a squared prime factor
            if (lpf[i / lpf[i]] == lpf[i])
                mobius[i] = 0;

            // Multiply -1 with the previous number
            else
                mobius[i] = -1 * mobius[i / lpf[i]];
        }
    }
}

// Function to find the number of pairs
// such that gcd equals to 1
ll gcd_pairs(ll a[], ll n)
{
    // To store maximum number
    ll maxi = 0;

    // To store frequency of each number
    ll fre[N] = { 0 };

    // Find frequency and maximum number
    for (ll i = 0; i < n; i++) {
        fre[a[i]]++;
        maxi = max(a[i], maxi);
    }

    least_prime_factor();
    Mobius();

    // To store number of pairs with gcd equals to 1
    ll ans = 0;

    // Traverse through the all possible elements
    for (ll i = 1; i <= maxi; i++) {
        if (!mobius[i])
            continue;

        ll temp = 0;
        for (ll j = i; j <= maxi; j += i)
            temp += fre[j];

        ans += temp * (temp - 1) / 2 * mobius[i];
    }

    // Return the number of pairs
    return ans;
}
void mu_calc(){

	for (int i = 1; i <= mx; i++)
        mu[i] = 1;
    for (int i = 2; i*i <= mx; i++)
    {
        if (mu[i] == 1)
        {
            for (int j = i; j <= mx; j += i)
                mu[j] *= -i;
            for (int j = i * i; j <= mx; j += i * i)
                mu[j] = 0;
        }
    }
    for (int i = 2; i <= mx; i++)
    {
        if (mu[i] == i)
            mu[i] = 1;
        else if (mu[i] == -i)
            mu[i] = -1;
        else if (mu[i] < 0)
            mu[i] = 1;
        else if (mu[i] > 0)
            mu[i] = -1;
    }
}

void run_case(){
	ll l,r,d,j,i;
	cin >> l >> r;
	ll c1 = 0,c2 = 0,c3 = 0,a1=0;

	ll a[r-l+1];

	for(d=1;d<=r;++d){
		a1+=mu[d]*(r/d)*(r/d);
	}
	for(i=l;i<=r;i++)
		a[i-l] = i;

	c1 = 2LL*gcd_pairs(a,r-l+1);
//	cout<<c1<<" "<<a1<<endl;
	for(i=l;i<=r;++i){
		for(j=i;j<=r;j+=i)
			++c3;
	}
	c3*=2;
	c3-=(r-l+1);
	ll ans = (r-l+1)*(r-l+1) - c1 - c3;
	if(l==1){
		ans+=2*r - 2;
	}
	cout<<ans<<"\n";

}

int main(){
	fast;
	mu_calc();
	int t=1;
	while(t--){
		run_case();
	}
}

//2021.6.19 by ljz
//email 573902690@qq.com
//if you find any bug in my code
//please tell me
#include<bits/stdc++.h>
//#include<ext/pb_ds/tree_policy.hpp>
//#include<ext/pb_ds/assoc_container.hpp>
using namespace std;
//using namespace __gnu_pbds;
//using namespace __gnu_cxx;
#define res int
#define LL long long
#define inf 0x3f3f3f3f
#define INF 0x3f3f3f3f3f3f3f
//#define unl __int128
#define eps 5.6e-8
#define RG
#define db double
//#define pc(x) __builtin_popcount(x)
//#define ctz(x) __builtin_ctz(x)
//#define pc(x) __builtin_popcountll(x)
typedef pair<int,int> Pair;
#define mp make_pair
#define fi first
#define se second
#define pi acos(-1.0)
#define pb push_back
#define ull unsigned LL
#define lowbit(x) (x&-x)
#define gc getchar
#define kcz 998244353
//template <class T>using Tree=tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
// inline char gc() {
//    static char buf[100000],*p1,*p2;
//    return p1==p2&&(p2=(p1=buf)+fread(buf,1,100000,stdin),p1==p2)?EOF:*p1++;
// }
//inline int read() {
//    res s=0,ch=gc();
//    while(ch<'0'||ch>'9')ch=gc();
//    while(ch>='0'&&ch<='9')s=s*10+ch-'0',ch=gc();
//    return s;
//}
// char sr[1<<21],z[20];
// int C=-1,Z=0;
// inline void Ot(){fwrite(sr,1,C+1,stdout),C=-1;}
// inline void print(res x){
//    if(C>1<<20)Ot();if(x<0)sr[++C]='-',x=-x;
//    while(z[++Z]=x%10+48,x/=10);
//    while(sr[++C]=z[Z],--Z);
// }
inline int read() {
    res s=0,ch=gc(),w=1;
    while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=gc();}
    while(ch>='0'&&ch<='9')s=s*10+ch-'0',ch=gc();
    return s*w;
}
inline LL Read() {
    RG LL s=0;
    res ch=gc();
    while(ch<'0'||ch>'9')ch=gc();
    while(ch>='0'&&ch<='9')s=s*10+ch-'0',ch=gc();
    return s;
}
//inline LL Read() {
//    RG LL s=0;
//    res ch=gc(),w=1;
//    while(ch<'0'||ch>'9'){if(ch=='-')w=-1;ch=gc();}
//    while(ch>='0'&&ch<='9')s=s*10+ch-'0',ch=gc();
//    return s*w;
//}
//inline void write(RG unl x){
//    if(x>10)write(x/10);
//    putchar(int(x%10)+'0');
//}
inline void swap(res &x,res &y) {
    x^=y^=x^=y;
}
inline void add(res &x,const res &y){
    x+=y,x>=kcz?x-=kcz:(x<0?x+=kcz:1);
}
inline int Add(const res &x,const res &y){
    return x+y>=kcz?x+y-kcz:(x+y<0?x+y+kcz:x+y);
}
inline int mul(const res &x,const res &y){
    return int(1LL*x*y%kcz);
}
inline int mul(const res &x,const res &y,const res &d){
    return int(1LL*x*y/d%kcz);
}
inline int qpow(res x,res y){
    if(y<=0)return 1;
    res ret=1;
    while(y){
        if(y&1)ret=mul(ret,x);
        x=mul(x,x),y>>=1;
    }
    return ret;
}
//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
//clock_t start=clock();
//inline void ck(){
//    if(1.0*(clock()-start)/CLOCKS_PER_SEC>0.1)exit(0);
//}
//2021.6.19 by ljz
//email 573902690@qq.com
//if you find any bug in my code
//please tell me
const int N=1e6+10;
namespace MAIN{
    int cnt[N],vis[N];
    inline void MAIN(){
        res L=max(2,read()),R=read();
        RG LL ans=0;
        for(res i=2;i<=N-10;i++){
            if(!vis[i]){
                for(res j=i;j<=N-10;j+=i)cnt[j]++,vis[j]=(vis[j]==-1?-1:1);
                if(1ll*i*i<=N-10)for(res sz=i*i,j=sz;j<=N-10;j+=sz)vis[j]=-1;
            }
        }
        for(res i=2;i<=R;i++){
            if(vis[i]==-1)continue;
            res t=R/i-(L-1)/i;
            if(cnt[i]&1)ans+=1ll*t*(t-1)/2;
            else ans-=1ll*t*(t-1)/2;
        }
        for(res i=L;i<=R;i++)ans-=R/i-1;
        printf("%lld\n",ans<<1);
//        for(res i=2;i<=N-10;i++){
//            if(!vis[i])prime[++tot]=i;
//            for(res j=1;j<=tot&&i*prime[j]<=N-10;j++){
//                vis[i*prime[j]]=1;
//                if(i%prime[j]==0)break;
//            }
//        }
    }
}
int main(){
//    srand(19260817);
    // freopen("tracing.in","r",stdin);
    // freopen("tracing.out","w",stdout);
    MAIN::MAIN();
//    Ot();
    return 0;
}


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

long long ara[2000006],tra[2000006];

int main()
{

        int n,m,a,b,c,d,e,p,q,l,r,s,fr,sc,tr,sz=0,tz,i,j,k,mx=LLONG_MIN,mn=LLONG_MAX;
        int x=0,y=0,cnt=0,res=0,ans=0,sum=0; int flg=0,flag=1,na=0,as=1;
        vector<int>u,v,w; vector< pair<int,int> >vct; vector<string>vst;
        set<int>st,nt,tt; map<int,int>mp,nq,qr; string str,ttr,ntr;

        long long g,h,aa,bb,cc,dd,f;

        scanf("%d %d",&l,&r);  g=r-l+1;  h=g*g;

        for(i=r;i>=1;i--)
        {

            s=0; q=0;

            s=r/i;  q=(l-1)/i;  p=s-q;

            aa=(long long)p;

            f=aa*aa;

            if(i!=1)
            {
                if(i>=l)
                {
                    p=p*2; p--;  x=x+p;
                }
            }

            ara[i]=f-tra[i];

            if(i!=1)
            {

                for(j=1;j*j<=i;j++)
                {
                    if(i%j==0)
                    {
                        fr=j;  sc=i/j;

                        tra[fr]=tra[fr]+ara[i];

                        if(sc!=i && sc!=fr)
                        {
                            tra[sc]=tra[sc]+ara[i];

                        }

                    }

                }

            }

            //cout<<i<<"    "<<ara[i]<<"     "<<p<<"        "<<tra[i]<<endl;
        }

        //cout<<ara[1]<<"   "<<x<<endl;

        h=h-ara[1];  h=h-x;

        printf("%lld\n",h);

   return 0;

}

#include<bits/stdc++.h>
using namespace std;
void __print(int x){cout<<x;}void __print(long x){cout<<x;}
void __print(long long x){cout<<x;}void __print(unsigned x){cout<<x;}
void __print(unsigned long x){cout<<x;}void __print(unsigned long long x){cout<<x;}
void __print(float x){cout<<x;}void __print(double x){cout<<x;}
void __print(long double x){cout<<x;}void __print(char x){cout<<'\''<<x<<'\'';}
void __print(const char *x){cout<<'\"'<<x<<'\"';}void __print(const string &x){cout<<'\"'<<x<<'\"';}
void __print(bool x) {cout<<(x?"true":"false");}
template<typename T, typename V>
void __print(const pair<T, V> &x) {cout << '{'; __print(x.first); cout << ','; __print(x.second); cout << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cout << '{'; for (auto &i: x) cout << (f++ ? "," : ""), __print(i); cout << "}";}
void _print() {cout << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cout << ", "; _print(v...);}
#ifndef ONLINE_JUDGE
#define debug(x...) cout << "[" << #x << "] = ["; _print(x)
#else
#define debug(x...)
#endif

#define lp(i,a,b)       for (int i=a;i<=b;i++)
#define rp(i,a,b)       for (int i=a;i>=b;i--)
#define ms(a,x)         memset(a,x,sizeof a)
#define int             long long
#define ff              first
#define ss              second
#define all(a)          a.begin(),a.end()
#define rall(a)         a.rbegin(),a.rend()
#define pb              push_back
#define nl              cout<<"\n"
#define gcd(a,b)        __gcd((a),(b))
#define lcm(a,b)        (((a)*(b))/(gcd(a,b)))
#define sq(a)           ((a)*(a))
#define sz(a)           (int) a.size()
#define mod             998244353
#define PI              (2*acos(0.0))

const int N=1e6+5;
int cnt[N],A[N],ex[N];

void solve()
{
  int l,r;
  cin>>l>>r;
  lp(i,l,r)
    cnt[i]++;
  for(int i=1;i<N;i++)
  {
    int sum=0;
    for(int j=i;j<N;j+=i)
    {
      sum=(sum+cnt[j]);
    }
    A[i]=sum;
  }
  int now=r-l+1;
  int ans=(now*(now-1));
  for(int i=N-1;i>=1;i--)
  {
    ex[i]=(A[i]*(A[i]-1));
    //if(ex[i]>0)
    {
    for(int j=i+i;j<N;j+=i)
      ex[i]=(ex[i]-ex[j]);
    }
  }
  ans-=ex[1];
  if(l==1) l++;
  lp(i,l,r)
  {
    for(int j=i+i;j<=r;j+=i)
      ans-=2;
  }
  cout<<ans;
}

signed main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL); cout.tie(NULL);
  int T=1;
  //cin>>T;
  while(T--) solve();
}


#include<bits/stdc++.h>
using namespace std;
#define arep(i,x,n) for(int i=int(x);i<(int)(n);i++)
#define rep(i,n) for(ll i = 0;i < (ll)n;++i)
#define rrep(i,n) for(int i=int(n-1);i>=0;i--)
#define fs first
#define sc second
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define coy cout<<"Yes"<<endl
#define con cout<<"No"<<endl
#define pi 3.141592653589793
#define eps 0.00000001
#define INF 1e9+7
#define LINF (ll)1e18+10
using ll = long long;

using P = pair<ll,ll>;
using fP = pair<double, double>;
using PPI = pair<P, int>;
using PIP = pair<int, P>;
using Ps = pair<int, string>;

using vi = vector<int>;
using vl = vector<ll>;
using vc = vector<char>;
using vd = vector<double>;
using vs = vector<string>;
using vp = vector<P>;
using vb = vector<bool>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;
using vvd = vector<vector<double>>;
using vvc = vector<vector<char>>;
using vvp = vector<vector<P>>;
using vvb = vector<vector<bool>>;
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; }

//const ll mod=998244353;
const ll mod = 1e9 + 7;
const ll MAX = 100;
template <typename T>
T abs(T a) { if (a < 0)return -a; else return a; }//2020/09/30 stdlib has abs(long) abs(long long) error
//////////////////////////////////////

int main(){
    int a,b;
    cin>>a>>b;
    double ans=(double)a*b/(double)100;
    cout<<ans<<endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main(){
	int n  , m;
	cin >> n >> m;
	double ans;
	ans = 1.0*m / 100 *n;
	cout << ans << endl ;
}


//#pragma GCC optimize("Ofast")
//#pragma GCC target("avx,avx2,fma")
//#pragma GCC optimization("unroll-loops")
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define int long long
template<class T> using indexed_set=tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
const int N=2e5+7;
const int mod=1e9+7;
const int INF=1e18+7;
const double EPS=1e-12;
const int dx[]={-1,1,0,0}; // UDLR
const int dy[]={0,0,-1,1}; // UDLR
inline int maximum(int a,int b) {int c=a>b?a:b; return c;}
inline int minimum(int a,int b) {int c=a>b?b:a; return c;}

int32_t main(){
    cin.tie(nullptr)->sync_with_stdio(false);

    vector<int> A(3); cin>>A[0]>>A[1]>>A[2];
    sort(A.begin(),A.end());
    do{
      if(A[2]-A[1]==A[1]-A[0]){
       cout<<"Yes"<<'\n'; return 0;
      }
    }while(next_permutation(A.begin(),A.end()));

     cout<<"No"<<'\n';

 return 0;
}

#include <iostream>
#include <cmath>
using namespace std;

const double EPS = (double)(1e-9);
double R, X, Y;

int main(void) {
	cin >> R >> X >> Y;

	double d = sqrt(X * X + Y * Y);
	double m = d / R;
	int n = (int)m;
	double diff = d - (R * n);

	int	ans = 2;
	if (d >= R) {
		ans = n;
		if (diff > EPS)
			++ans;
	}
	cout << ans << '\n';
	return 0;
}


#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cmath>
#include<queue>
#include<map>
#include<stack>
#include<set>
#define iss ios::sync_with_stdio(false)
using namespace std;
typedef long long ll;
using namespace std;
typedef long long ll;
const int maxn = 1e6 + 7;
const int mod = 998244353;
int head[maxn],num,fa[maxn],n,m,ans[maxn];
struct node{
    int  v,w,next;
}e[maxn];
void add(int u,int v,int w){
    e[num].next = head[u];
    e[num].v = v;
    e[num].w = w;
    head[u] = num ++;
}
int Find(int x){
    if(fa[x] != x) fa[x] = Find(fa[x]);
    return fa[x];
}
void dfs(int u,int pre){
    for(int i = head[u];i != -1;i = e[i].next){
        int to = e[i].v,w = e[i].w;
        if(to == pre) continue;
        if(w == ans[u]){
           if(w == n) ans[to] = 1;
           else ans[to] = w + 1;
        }
        else ans[to] = w;
        dfs(to,u);
    }
}
int main (){
    scanf("%d%d",&n,&m);
    memset(head,-1,sizeof(head));
    for(int i = 1; i <= n; i ++){
        fa[i] = i;
    }
    for(int i = 1,u,v,w; i <= m; i ++){
        scanf("%d%d%d",&u,&v,&w);
        int x = Find(u);
        int y = Find(v);
       // printf ("%d %d..\n",x,y);
        if(x == y) continue;
        fa[x] = y;
       // printf ("%d %d %d\n",u,v,w);
        add(u,v,w);
        add(v,u,w);
    }
    ans[1] = 1;
    dfs(1,-1);
    for(int i = 1; i <= n; i ++){
        printf ("%d\n",ans[i]);
    }

}

#include<iostream>
#include<string>
#include<vector>
#include<cmath>
#include<queue>
#include<stack>
#include<set>
#include<algorithm>
#include<utility>
#include<map>
#include<tuple>
#include<deque>
using namespace std;
const int mod = 1000000007;
const int INF = 1001001001;
const long long LINF = 1001002003004005006;
const double PI = acos(-1);
int dir4row[] = { 1,0,-1,0 };
int dir4col[] = { 0,1,0,-1 };
int dir8row[] = { 1,1,0,-1,-1,-1,0,1 };
int dir8col[] = { 0,1,1,1,0,-1,-1,-1 };

/*-----------------------------------------------*/

int main() {
	int n, w; cin >> n >> w;
	vector<long long> v(200005);
	for (int i = 0; i < n; ++i) {
		int s, t, p; cin >> s >> t >> p;
		v[s] += p;
		v[t] -= p;
	}
	for (int i = 1; i < 200005; ++i) {
		v[i] = v[i] + v[i - 1];
	}
	for (int i = 0; i < 200005; ++i) {
		if (v[i] > (long long)w) {
			cout << "No" << endl;
			return 0;
		}
	}
	cout << "Yes" << endl;
	return 0;
}


#include<iostream>
using namespace std;
#include<vector>
#include <algorithm>
#include <bits/stdc++.h>
#define re(i,n) for(int i = 0; i < n; i++)
const int MOD = 998244353;

int main(){
    int n, k;
    cin >> n >> k;
    int array[n-1];
    re(i, n - 1) array[i] = i+ 1;
    vector<vector<int>> t(n, vector<int>(n));
    re(i,n){
        re(j,n) cin >> t[i][j];
    }
    int cnt = 0;
    do{ int sum = t[0][array[0]];;
        for(int i=0; i<n-2; i++){
           sum += t[array[i]][array[i+1]];
        }
        sum+=t[array[n-2]][0];
        if(sum == k) cnt++;
    }while(next_permutation(array,array+n-1));
    cout << cnt << endl;;
}

#include<bits/stdc++.h>
#define fastio  ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define printara(ara, n) for(int i = 0; i < n; i++) cout << ara[i] << ' '; cout << endl;
#define printvec(vec) for(auto it : vec) cout << it << ' '; cout << endl;
#define debug(x) cout << #x << "--> " << x << endl;
#define int long long
#define pii pair<int, int>
#define ff first
#define ss second
using namespace std;
int n, m, k, cost[10][10], vis[10];
int solve(int i, int sum, bool isfirst)
{
	if (i == 1 && !isfirst)
	{
		if (sum == k) return 1;
		else return 0;
	}
	int ans = 0;
	for (int j = 1; j <= n; j++)
	{
		if (i != j && vis[j] == false)
		{
			vis[j] = true;
			ans += solve(j, sum + cost[i][j], false);
			vis[j] = false;
		}
	}
	return ans;
}
main()
{
	fastio;
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	cin >> n >> k;
	for (int i = 1; i <= n; i++)
	{
		for (int j = 1; j <= n; j++) cin >> cost[i][j];
	}
	int ans = solve(1, 0, true);
	cout << ans << endl;
}


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

typedef long double ld;
const long long inf = 1100000000000000000;
#define maxn 1000005
#define mod 1000000007 //998244353
#define int long long
#define PB push_back
#define eb emplace_back
#define all(c) (c).begin(),(c).end()
#define pii pair <int,int>
#define vi vector<int>
#define F first
#define S second
#define rep(i,a,b)  for(int i=a;i<b;i++)
#define rep1(i,a,b) for(int i=a;i<=b;i++)
#define repd(i,a,b) for(int i=a;i>=b;--i)
#define sz(x) (int)((x).size())
#define mem(a,x) memset(a,x,sizeof(a))
const long double PI=3.141592653589793238462643383279502884197169399375105820974944;

void solve(){
	int n, s, d; cin>>n>>s>>d;
	int ck = 0;
	rep(i, 0, n){
		int x, y; cin>>x>>y;
		if(s > x and y > d) ck = 1;
	}
	if(ck) cout<<"Yes";
	else cout<<"No";
}

signed main(){
    ios_base::sync_with_stdio(false), cin.tie(nullptr);
    int T=1; //cin>>T;
    while(T--){
        solve();cout<<'\n';
    }
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{

	int n,s,d ,x,y,m=0;

	cin >> n >> s >> d;

	while(n--)
	{
	cin >> x >> y;

	if(x<s && y >d)
	{
		m=1;
		break;
	}
	}

	if(m==1)
	{
		cout << "Yes" << endl;
	}
	else
	cout << "No" << endl;
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
const int maxn = 200000 + 10;
char s[maxn];
int num[256];
int main(){
	cin >> (s + 1);
	int n = strlen(s + 1);
	num[s[n]]++;
	long long ans = 0;
	for(int i = n - 1; i; i--){
		num[s[i]]++;
		if(s[i] == s[i + 1]){
			ans -= num[s[i]];
			for(int j = 'a'; j <= 'z'; j++) ans += num[j];
			for(int j = 'a'; j <= 'z'; j++){
				if(j == s[i]) continue;
				num[s[i]] += num[j];
				num[j] = 0;
			}
		}
	}
	cout << ans << endl;
	return 0;
}

#include <bits/stdc++.h>
#define LL long long
#define ft first
#define sd second
#define mp(x,y) make_pair(x,y)
#define int LL
using namespace std;
//const int N   = ;
//const int mod = ;
const int INF =numeric_limits<int >::max();
#define For(n) for (int i=1;i<=n;++i)
#define rep(i,n) for (int i=1;i<=n;++i)
#define repp(i,x,y) for (int i=x;i<=y;++i)
void read(int &x)
{
	x=0;
	char ch=getchar();
	int f=1;
	while (!isdigit(ch)) (ch=='-'?f=-1:0),ch=getchar();
	while ( isdigit(ch)) x=x*10+ch-'0',ch=getchar();
	x*=f;
}

int solve(int x)
{
	int tmp=0;
	for (int i=1;i<=x;++i)
	{
		int j=x/(x/i);
		tmp+=(j-i+1)*(x/i);
		i=j;
	}
	return tmp;
}
int ans,K;
int qsm(int a,int b,int mod)
{
	int tmp=1;
	while (b)
	{
		if (b&1) tmp=tmp*a%mod;
		b>>=1;
		a=a*a%mod;
	}
	return tmp;
}
int a,b,c,cnt[30];
char s[2000000+2];
signed main()
{
	scanf("%s",s+1);
	int n=strlen(s+1);
	int nxt=n+1;
	cnt[s[n]-'a']++;
	cnt[s[n-1]-'a']++;
	for (int i=n-2;i>=1;--i)
	{
		if (s[i]==s[i+1]&&s[i+1]!=s[i+2])
		{
			ans+=n-i-cnt[s[i]-'a'];
			memset(cnt,0,sizeof(cnt));
			cnt[s[i]-'a']=n-i;
		}
		cnt[s[i]-'a']++;
	}
	printf("%lld",ans);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define MOD2 998244353
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
#define reps(i,s,n) for (int i = (int)(s); i < (int)(n); i++)
#define repit(i,C) for (auto i = (C).begin(); i != (C).end(); i++)
#define pr(a) cout << a
#define prl(a) cout << (a) << endl
#define prld(a) cout << setprecision(15)<< (a) << endl
#define allrange(a) a.begin(),a.end()

bool solve_translated(vector<pair<int,int>> &S,vector<pair<int,int>> &T){
    int N = S.size();
    int dx = S[0].first-T[0].first;
    int dy = S[0].second-T[0].second;
    bool flg = true;
    reps(i,1,N){
        if(!((S[i].first==T[i].first+dx) && (S[i].second==T[i].second+dy))){flg = false; break;}
    }
    return flg;
}
/*ピタゴラ三角形
    5	12	13
    8	15	17
    3	4	5
*/
vector<pair<int,int>> Pitagora_rot(vector<pair<int,int>> &S,int a, int b , int c){
    int N = S.size();
    vector<pair<int,int>> PS(N);
    auto pt0 = S[0];
    PS[0] = pt0;
    bool flg = true;
    reps(i,1,N){
        int dx = S[i].first - pt0.first;
        int dy = S[i].second - pt0.second;
        if(((dx*b+dy*a)%c)!=0 || ((dx*a-dy*b)%c)!=0) {flg = false; break;}
        PS[i] = make_pair((dx*a-dy*b)/c+pt0.first, (dx*b+dy*a)/c+pt0.second);
    }
    if(flg) return PS;
    else return vector<pair<int,int>>();
}

int main(){
    std::cin.tie(0); // cinとcoutの同期を解除
    std::ios::sync_with_stdio(false);
    int N;cin >> N;
    bool flg=true;

    vector<pair<int,int>> S(N),T(N);
    rep(i,N)
    {
        int x,y;
        cin >> x >> y;
        S[i].first = x;S[i].second = y;
    }

    rep(i,N)
    {
        int x,y;
        cin >> x >> y;
        T[i].first = x;
        T[i].second = y;
    }
    sort(allrange(T));

/*ピタゴラ三角形
    5	12	13
    8	15	17
    3	4	5
*/
    vector<vector<int>> tri(0);
    tri.push_back(vector<int>({5, 12, 13}));
    tri.push_back(vector<int>({5, 12, 13}));
    tri.push_back(vector<int>({12, 5, 13}));
    tri.push_back(vector<int>({8,15,17}));
    tri.push_back(vector<int>({15,8,17}));
    tri.push_back(vector<int>({3,4,5}));
    tri.push_back(vector<int>({4,3,5}));
    tri.push_back(vector<int>({0,1,1}));
    tri.push_back(vector<int>({-1,0,1}));
    tri.push_back(vector<int>({0,-1,1}));
    tri.push_back(vector<int>({1,0,1}));
   //tri.push_back(vector<int>({-5, 12, 13}));
  //  tri.push_back(vector<int>({-12, 5, 13}));
  //  tri.push_back(vector<int>({-8,15,17}));
  //  tri.push_back(vector<int>({-15,8,17}));
    tri.push_back(vector<int>({-3,4,5}));
    tri.push_back(vector<int>({-4,3,5}));
    tri.push_back(vector<int>({-5, -12, 13}));
    tri.push_back(vector<int>({-12, -5, 13}));
 //   tri.push_back(vector<int>({-8,-15,17}));
 //   tri.push_back(vector<int>({-15,-8,17}));
    tri.push_back(vector<int>({-3,-4,5}));
    tri.push_back(vector<int>({-4,-3,5}));
 //   tri.push_back(vector<int>({5, -12, 13}));
 //   tri.push_back(vector<int>({12, -5, 13}));
 //   tri.push_back(vector<int>({8,-15,17}));
    tri.push_back(vector<int>({15,-8,17}));
    tri.push_back(vector<int>({3,-4,5}));
    tri.push_back(vector<int>({4,-3,5}));

    flg=false;

    if(S.size()==2 && T.size()==2){
        auto sx = S[0].first-S[1].first;
        auto sy = S[0].second-S[1].second;
        auto tx = T[0].first-T[1].first;
        auto ty = T[0].second-T[1].second;
        flg= (sx*sx+sy*sy==tx*tx+ty*ty);
    } else {
        rep(j,tri.size()){
            auto S2 = Pitagora_rot(S,tri[j][0],tri[j][1],tri[j][2]);
            if(S2.empty()) continue;
            sort(allrange(S2));
            flg = solve_translated(S2,T);
            if(flg) break;
        }
    }
    if(flg) prl("Yes"); else prl("No");
}

#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>

using namespace std;

const int N = 200;

int a[N], b[N], c[N], d[N];

int main()
{
    int n;
    cin >> n;
    for (int _ = 0; _ < 2; _ ++)
    {
        for (int i = 0; i < n; i ++) cin >> a[i] >> b[i];
        int x = 0, y = 0;
        for (int i = 0; i < n; i ++)
        {
            x += a[i]; y += b[i];
            a[i] *= n; b[i] *= n;
        }
        for (int i = 0; i < n; i ++)
        {
            a[i] -= x;
            b[i] -= y;
        }
        swap(a, c);
        swap(b, d);
    }
    for (int i = 0; i < n; i ++)
        if (a[i] || b[i])
        {
            swap(a[i], a[0]);
            swap(b[i], b[0]);
        }
    string ans = "No";
    double eps = 1e-6;
    for (int i = 0; i < n; i ++)
    {
        double angle = atan2(d[i], c[i]) - atan2(b[0], a[0]);
        bool flag = true;
        for (int j = 0; j < n; j ++)
        {
            double u = a[j] * cos(angle) - b[j] * sin(angle);
            double v = a[j] * sin(angle) + b[j] * cos(angle);
            bool flag2 = false;
            for (int k = 0; k < n; k ++)
                if (abs(u - c[k]) <= eps && abs(v - d[k]) < eps) flag2 = true;
            flag &= flag2;
        }
        if (flag) ans = "Yes";
    }
    cout << ans << endl;
    return 0;
}


#include<iostream>

using namespace std;

int t;
long long n;
int main()
{
    cin>>t;
    while(t--)
    {
        cin>>n;
        if(n%2==0)
        {
            if(n%4==0)
                cout<<"Even"<<endl;
            else
                cout<<"Same"<<endl;
        }
        else  cout<<"Odd"<<endl;
    }
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e2 + 50;
vector<int>vc;
bool isp(int x){
	for(int i = 2;i*i <= x;i++){
		if(x%i==0)return false;
	}
	return true;
}
int calc(int x){
	int tx = x;
	int cnt = 0;
	for(int i = 0;i < vc.size();i++){
		while(x%vc[i] == 0){
			x/=vc[i];
			cnt++;
		}
	}
	return cnt+1;
}
int main() {
   	int t;
	cin >> t;
	int f = 0;
	for(int i = 1;i<= t;i++){
		if(f)cout << ' ';
		if(i==1)cout << '1';
		else if(isp(i)){
			vc.push_back(i);
			cout << 2;
		}else cout << calc(i);
		f = 1;
	}
    return 0;
}


#include <bits/stdc++.h>
#define ll        long long int
#define ld        long double
#define pi        pair<int,int>
#define all(x)    x.begin(), x.end()
#define allr(x)   x.rbegin(), x.rend()
#define sz(x)     ((int)x.size())
#define ln(x)     ((int)x.length())
#define mp        make_pair
#define pb        push_back
#define ff        first
#define ss        second
#define endl      '\n'
#define dbg(x)    cout << #x << ": " << x << endl
#define clr(x,v)  memset(x, v, sizeof(x))
#define fix(x)    cout << setprecision(x) << fixed;
#define FASTIO    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
using namespace std;

const double eps = 1e-9;
const double PI = acos(-1.0);
const ll mod = 1e9 + 7;
const ll inf = 1LL << 30;
const int MAXN = 1e5 + 5;

vector<vector<int>> row, col;

void cp()
{
    int n, m, p, q;
    cin >> n >> m >> p >> q;
    row = vector<vector<int>>(n + 1, vector<int>(m + 1));
    col = vector<vector<int>>(n + 1, vector<int>(m + 1));
    vector<vector<int>> block_row(n), block_col(m);
    vector<vector<int>> bulb_row(n), bulb_col(m);
    for(int i = 0, x, y; i < p; i++)
        cin >> x >> y, x--, y--, bulb_row[x].pb(y), bulb_col[y].pb(x);
    for(int i = 0, x, y; i < q; i++)
        cin >> x >> y, x--, y--, block_row[x].pb(y), block_col[y].pb(x);

    for(int i = 0; i < n; i++)
    {
        sort(all(block_row[i]));
        for(int x : bulb_row[i])
        {
            // find left block
            int left = -1;
            int lo = 0, hi = sz(block_row[i]) - 1;
            while(lo <= hi)
            {
                int mid = (lo + hi) >> 1;
                if(block_row[i][mid] < x)
                    left = block_row[i][mid], lo = mid + 1;
                else
                    hi = mid - 1;
            }
            // find right block
            int right = m;
            lo = 0, hi = sz(block_row[i]) - 1;
            while(lo <= hi)
            {
                int mid = (lo + hi) >> 1;
                if(block_row[i][mid] > x)
                    right = block_row[i][mid], hi = mid - 1;
                else
                    lo = mid + 1;
            }
            left++, right--;
            row[i][left]++;
            row[i][right + 1]--;
        }

        for(int j = 1; j < m; j++)
            row[i][j] += row[i][j - 1];
    }

    for(int i = 0; i < m; i++)
    {
        sort(all(block_col[i]));
        for(int x : bulb_col[i])
        {
            // find top block
            int top = -1;
            int lo = 0, hi = sz(block_col[i]) - 1;
            while(lo <= hi)
            {
                int mid = (lo + hi) >> 1;
                if(block_col[i][mid] < x)
                    top = block_col[i][mid], lo = mid + 1;
                else
                    hi = mid - 1;
            }
            // find bottom block
            int bottom = n;
            lo = 0, hi = sz(block_col[i]) - 1;
            while(lo <= hi)
            {
                int mid = (lo + hi) >> 1;
                if(block_col[i][mid] > x)
                    bottom = block_col[i][mid], hi = mid - 1;
                else
                    lo = mid + 1;
            }
            top++, bottom--;
            col[top][i]++;
            col[bottom + 1][i]--;
        }

        for(int j = 1; j < n; j++)
            col[j][i] += col[j - 1][i];
    }

    int ans = 0;
    for(int i = 0; i < n; i++)
        for(int j = 0; j < m; j++)
            ans += (row[i][j] || col[i][j]);
    cout << ans << endl;
}

int main()
{
    FASTIO;
    int t;
    t = 1;
    // cin >> t;
    while(t--)
    {
        cp();
    }
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

// #define endl '\n'
#define int long long int
#define rep(i, a, b) for (int i = a; i < b; i++)
#define revrep(i, a, b) for (int i = a; i >= b; i--)
#define pb push_back
#define pii pair<int, int>
#define vi vector<int>
#define vii vector<pii>
#define min3(a, b, c) min(a, min(b, c))
#define max3(a, b, c) max(a, max(b, c))

ostream &operator<<( ostream &output, const pii &p ) { output << p.first << " " << p.second;return output; }
istream &operator>>( istream &input, pii &p ) { input >> p.first >> p.second;return input; }
template<typename T>
void inline println(vector<T> args){ for(T i: args)cout<<i<<" ";cout<<endl; }

int INF = 1e18;
int MOD = 1e9+7;

void solve()
{
    int n, t; cin>>n>>t;
    vi small, big;
    rep(i, 0, n/2) {
        int temp; cin>>temp;
        small.pb(temp);
    }
    rep(i, 0, n-small.size()) {
        int temp; cin>>temp;
        big.pb(temp);
    }
    sort(small.begin(), small.end());
    sort(big.begin(), big.end());
    set<int> sSum, bSum;
    int nn = small.size();
    int allOne = 1LL<<nn;
    rep(mask, 0, allOne) {
        int sum = 0;
        rep(s, 0, nn) {
            if(mask&(1LL<<s))
                sum += small[s];
        }
        sSum.insert(sum);
    }
    nn = big.size();
    allOne = 1LL<<nn;
    rep(mask, 0, allOne) {
        int sum = 0;
        rep(s, 0, nn) {
            if(mask&(1LL<<s))
                sum += big[s];
        }
        bSum.insert(sum);
    }
    int ans = 0;
    for(int sum: sSum) {
        auto ptr = bSum.upper_bound(t-sum);
        int rem = *prev(ptr);
        if(rem+sum <= t) ans = max(ans, rem+sum);
    }
    for(int sum: bSum) {
        auto ptr = sSum.upper_bound(t-sum);
        int rem = *prev(ptr);
        if(rem+sum <= t) ans = max(ans, rem+sum);
    }
    cout<<ans<<endl;
}

signed main()
{

    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t = 1;
    // cin >> t;
    rep(i, 0, t)
    {
        solve();
    }
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
using ll = long long;
using P = pair<int , int>;
const int MaxA =200;

int main(){
  //
  int n;
  cin>>n;
  vector<int> a(n);
  rep(i,n) cin>>a[i];
  //
  vector<int> d(MaxA*2+1,0);
  rep(i,n) d[MaxA+a[i]]++;
  ll ans = 0;
  rep(ai,d.size()){rep(aj,ai){
    ll x=ai-aj;
    ans+=x*x*d[ai]*d[aj];
  }}

  cout<<ans<<endl;
  return 0;
}

#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i,n) for(int i=0;i<(n);++i)
#define repi(i,a,b) for(int i=int(a);i<int(b);++i)
#define rrep(i,n) for(int i=((n)-1);i>=0;--i)
#define all(x) (x).begin(), (x).end()
#define PI 3.14159265358979323846264338327950L
#define mod 1000000007
using namespace std;
typedef long long ll;
typedef long double ld;
int main() {
    int n,k;
    cin>>n>>k;
    int sum=0;
    repi(i,1,n+1){
        repi(j,1,k+1){
            sum+=i*100+j;
        }
    }
    cout<<sum;
}


#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i =0; i<(n); ++i)
using ll = long long;
using P =pair<int, int>;

int main(){
    int n;
    cin >>n;
    vector<int> v(n);
    int m=0;
    rep(i,n){
        cin >> v[i];
        m=max(m,v[i]);
    }
    int ma=0;
    int ans=2;
    for (int i=2; i<=m; ++i){
        int k=0;
        rep(j,n){
            if (v.at(j)%i==0){
                ++k;
            }
        }
        if(k>ma){
            ma=k;
            ans=i;
        }
    }
    cout << ans << endl;
}

//#pragma GCC optimize ("O2")
//#pragma GCC target ("avx2")
//#include<bits/stdc++.h>
//#include<atcoder/all>
//using namespace atcoder;

#include<cstdio>
#include<cstring>
#include<algorithm>

using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please

const int b = 8;
int A[100000];
int tmp[100001];
const int CM = 1 << 17, CL = 12;
char cn[CM + CL], * ci = cn + CM + CL, * owa = cn + CM, ct;
const ll ma0 = 1157442765409226768;
const ll ma1 = 1085102592571150095;
const ll ma2 = 71777214294589695;
const ll ma3 = 281470681808895;
const ll ma4 = 4294967295;
inline int getint() {
	if (ci - owa > 0) {
		memcpy(cn, owa, CL);
		ci -= CM;
		fread(cn + CL, 1, CM, stdin);
	}
	ll tmp = *(ll*)ci;
	if ((tmp & ma0) ^ ma0) {
		int dig = 68 - __builtin_ctzll((tmp & ma0) ^ ma0);
		tmp = tmp << dig & ma1;
		tmp = tmp * 10 + (tmp >> 8) & ma2;
		tmp = tmp * 100 + (tmp >> 16) & ma3;
		tmp = tmp * 10000 + (tmp >> 32) & ma4;
		ci += (72 - dig >> 3);
	}
	else {
		tmp = tmp & ma1;
		tmp = tmp * 10 + (tmp >> 8) & ma2;
		tmp = tmp * 100 + (tmp >> 16) & ma3;
		tmp = tmp * 10000 + (tmp >> 32) & ma4;
		ci += 8;
		if ((ct = *ci++) >= '0') {
			tmp = tmp * 10 + ct - '0';
			if (*ci++ == '0') {
				tmp = tmp * 10;
				ci++;
			}
		}
	}
	return tmp;
}
void okuri() {
	if (ci - owa > 0) {
		memcpy(cn, owa, CL);
		ci -= CM;
		fread(cn + CL, 1, CM, stdin);
	}
	ll tmp = *(ll*)ci;
	if ((tmp & ma0) ^ ma0) {
		ci += 4 + __builtin_ctzll((tmp & ma0) ^ ma0) >> 3;
	}
	else {
		ci += 8;
		tmp = *(ll*)ci;
		ci += 4 + __builtin_ctzll((tmp & ma0) ^ ma0) >> 3;
	}
}

const int dm = 1 << 17;
char dn[dm], * di = dn;
const char f[10] = "First\n";
const char s[10] = "Second\n";

int main() {
	//cin.tie(0);
	//ios::sync_with_stdio(false);

	int T = getint();

	int are = 1 << 14;
	int owa = are;
	rep(t, T) {
		int N = getint();

		if (N % 2) {
			rep(i, N) okuri();
			memcpy(di, s, 7);
			di += 7;
		}
		else {
			rep(i, N) A[i] = getint();
			if (N > 256) {
				rep(k, 4) {
					int kazu[1 << b] = {}, kazu2[1 << b] = {};
					rep(i, N) kazu[A[i] >> k * b & ((1 << b) - 1)]++;
					rep(i, (1 << b) - 1) kazu[i + 1] += kazu[i];
					for (int i = N - 1; i >= 0; i--) tmp[--kazu[A[i] >> k * b & ((1 << b) - 1)]] = A[i];
					k++;
					rep(i, N) kazu2[tmp[i] >> k * b & ((1 << b) - 1)]++;
					rep(i, (1 << b) - 1) kazu2[i + 1] += kazu2[i];
					for (int i = N - 1; i >= 0; i--) A[--kazu2[tmp[i] >> k * b & ((1 << b) - 1)]] = tmp[i];
				}
			}
			else sort(A, A + N);

			int mae = 0, k = 0;
			rep(i, N) {
				if (mae == A[i]) k++;
				else {
					if (k & 1) break;
					k = 1;
					mae = A[i];
				}
			}

			if (k & 1) {
				memcpy(di, f, 6);
				di += 6;
			}
			else {
				memcpy(di, s, 7);
				di += 7;
			}
		}
		if (t > owa) {
			owa += are;
			fwrite(dn, 1, di - dn, stdout);
			di = dn;
		}
	}
	fwrite(dn, 1, di - dn, stdout);

	Would you please return 0;
}


#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define ll long long
#define ull unsigned long long
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
#define dcml(x) cout<<fixed<<setprecision(x)
#define F first
#define S second
#define mine(a) *min_element(all(a))
#define maxe(a) *max_element(all(a))
using namespace std;
void yes(){puts("Yes");return;}
void no() {puts("No"); return;}
template <class T> void chmin(T &a,const T &b){a>b?a=b:0;}
template <class T> void chmax(T &a,const T &b){a<b?a=b:0;}
const int inf=0x3fffffff;
const char sp=' ';

int main(){
  int n;
  cin>>n;
  int ans=n*1.08;
  if(ans<206) puts("Yay!");
  else if(ans==206) puts("so-so");
  else puts(":(");
}

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

int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int mx = 0;
  int mn = 1e9 + 10;
  map<int, int> mp;
  for (int i = 0; i < n; ++i) {
    ++mp[a[i]];
    mx = max(mx, a[i]);
    mn = min(mn, a[i]);
  }
  // cout << mx << endl;
  // cout << mn << endl;
  // for (auto x : mp) {
  //   cout << x.first << " " << x.second << endl;
  // }
  while (true) {
    if (mx == mn) {
      break;
    }
    mp[mx - mn] = mx - mn;
    mp.erase(mx);
    mx = mp.rbegin()->first;
    mn = mp.begin()->first;
    // cout << "mx " << mx << endl;
    // cout << "mn " << mn << endl;
  }
  cout << mx << endl;
}


/**
 * Author: Daniel
 * Created Time: 2021-04-12 12:44:39
**/

#include <bits/stdc++.h>

using namespace std;

#define F first
#define S second
#define ER erase
#define IS insert
#define PI acos(-1)
#define PB pop_back
#define MP make_pair
#define MT make_tuple
#define LB lower_bound
#define UB upper_bound
#define EB emplace_back
#define lowbit(x) (x & -x)
#define SZ(x) ((int)x.size())
#define ALL(x) x.begin(), x.end()
#define RALL(x) x.rbegin(), x.rend()
#define SOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);cout<<fixed<<setprecision(10)

typedef long long LL;
typedef vector<LL> VL;
typedef vector<int> VI;
typedef vector<bool> VB;
typedef pair<LL, LL> PLL;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef unsigned long long ULL;
typedef pair<double, double> PDD;
typedef vector<pair<LL, LL> > VPLL;
typedef vector<pair<int, int> > VPII;

template <typename A> using VE = vector<A>;
template <typename A> using USET = unordered_set<A>;
template <typename A> using HEAP = priority_queue<A>;
template <typename A, typename B> using PA = pair<A, B>;
template <typename A, typename B> using UMAP = unordered_map<A, B>;
template <typename A> using RHEAP = priority_queue<A, vector<A>, greater<A> >;

template <typename A> A MAX(const A &a) { return a; }
template <typename A> A MIN(const A &a) { return a; }
template <typename A> A MAX(const A *a, const A *b) { return *max_element(a, b); }
template <typename A> A MIN(const A *a, const A *b) { return *min_element(a, b); }
template <typename A, typename... B> A MAX(const A &a, const B&... b) { return max(a, MAX(b...)); }
template <typename A, typename... B> A MIN(const A &a, const B&... b) { return min(a, MIN(b...)); }
template <typename A, typename B = typename std::iterator_traits<A>::value_type> B MAX(A a, A b) { return *max_element(a, b); }
template <typename A, typename B = typename std::iterator_traits<A>::value_type> B MIN(A a, A b) { return *min_element(a, b); }

mt19937 rng((unsigned int)chrono::steady_clock::now().time_since_epoch().count());

///////////////////////////////////////////////////////////////////////////
//////////////////// DO NOT TOUCH BEFORE THIS LINE ////////////////////////
///////////////////////////////////////////////////////////////////////////

// check the limitation!!!
const int N = 100010, M = 1010;

// read the question carefully!!!
int main()
{
    SOS;

    VS g(3);
    for (auto &s : g) cin >> s;
    map<char, int> mp;
    int t = 0;
    for (auto &s : g)
        for (auto &c : s)
            if (!mp.count(c))
                mp[c] = t ++ ;
    if (SZ(mp) > 10)
    {
        cout << "UNSOLVABLE\n";
        return 0;
    }
    VL p(10);
    iota(ALL(p), 0LL);
    auto get = [&](string s) -> string
    {
        string res;
        for (auto &c : s) res += (char)(p[mp[c]] + '0');
        return res;
    };
    auto calc = [&](string s) -> LL
    {
        return stol(s);
    };
    do
    {
        VS b(3);
        bool flag = true;
        for (int i = 0; i < 3; i ++ )
        {
            b[i] = get(g[i]);
            flag &= (b[i][0] != '0');
        }
        if (!flag) continue;
        VL a(3);
        for (int i = 0; i < 3; i ++ ) a[i] = calc(b[i]);
        if (a[0] > 0 && a[1] > 0 && a[2] > 0 && a[0] + a[1] == a[2])
        {
            for (auto &u : a)
                cout << u << '\n';
            return 0;
        }
    } while (next_permutation(ALL(p)));
    cout << "UNSOLVABLE\n";
    return 0;
}

// GOOD LUCK!!!

//noob
#include<bits/stdc++.h>
using namespace std;
#define f0(i,a,n) for(int i=a;i<n;i++)
#define f1(i,a,n) for(int i=a;i<=n;i++)
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define ll long long int
#define ld long double
#define ull unsigned long long int
#define pi acos(-1)
#define test() int T,t=1;cin>>T;
#define all(x) (x).begin(),(x).end()
#define sz(x) (int(x.size()))
typedef vector<int> vi;
typedef pair<int,int> PI;

const int INF = 1e9 + 5;

template<typename T> void out(const T& t){std::cout << t << "\n";}
template <typename T>
void print_vector(const vector<T>& V){
  for(int i=0; i < V.size(); i++)
    cout << V[i] << " ";
  cout<<endl;
}

//function
int gcd(int a,int b);

void solve(){
	int a,b,sa=0,sb=0;cin>>a>>b;
	while(a) sa+=a%10,a/=10;
	while(b) sb+=b%10,b/=10;
	out(max(sa,sb));
}
int main(){
ios_base::sync_with_stdio(false);cin.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
#endif
int t=1;
while(t--)
solve();
	return 0;
}
int gcd(int x, int y) {
	return y == 0 ? x : gcd(y, x % y);
}


#include<iostream>
#include<cstring>
#include<cmath>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<deque>
#include <algorithm>

using namespace std;

#define mem(a,b) memset(a,b,sizeof a)
#define PII pair<int,int>
#define ll long long
#define ull unsigned long long
#define ft first
#define sd second
#define endl '\n'
#define PI acos(-1.0)
#define lcm(a,b) a/gcd(a,b)*b
#define INF_INT 0x3f3f3f3f
#define debug(a) cout<<#a<<"="<<a<<endl;
#define _for(i,a,b) for( int i=(a); i<(b); ++i)
#define _rep(i,a,b) for( int i=(a); i<=(b); ++i)

//inline void print(__int128 x){if(x<0){putchar('-');x=-x;}if(x>9) print(x/10);putchar(x%10+'0');}
int gcd(int a, int b){return b ? gcd(b, a % b) : a;}
int exgcd(int a, int b, int &x, int &y){if(!b){x = 1; y = 0;return a;}int d = exgcd(b, a % b, y, x);y -= (a/b) * x;return d;}
ll qmi(ll m, ll k, ll p){ll res = 1 % p, t = m;while (k){if (k&1) res = res * t % p;t = t * t % p;k >>= 1;}return res;}
inline int read(){int s=0,x=1;char ch=getchar();while(ch<'0'||ch>'9') {if(ch=='-') x=-1; ch=getchar();}while(ch>='0'&&ch<='9'){s=s*10+ch-'0';ch=getchar(); }return s*x;}

const int NN = 1e6+7;
const int mod = 1e9+7;

int N,M,k;

ll C(int n, int m){
    if(n<0||m<0) return 0;
    ll res = 1;

    _rep(i,1,n+m){
        res = (res*i)%mod;
    }

    _rep(i,2,m){
        ll ni = qmi(i,mod-2,mod);
        res = (res*ni) %mod;
    }
    _rep(i,2,n){
        ll ni = qmi(i,mod-2,mod);
        res = (res*ni) %mod;
    }
    return res;
}
void solve()
{
    cin >> N >> M >> k;
    if(N-k-M > 0) puts("0");
    else{
        cout << (C(N,M)-C(N-k-1,M+k+1)+mod)%mod << endl;
    }
}
int main()
{
    //ios::sync_with_stdio(0);
    int T = 1;

    while(T--)
    {
        solve();
    }
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
const int kN = 1e5 + 10;

int k, N, M;
int a[kN];
int main() {
  scanf("%d%d%d", &k, &N, &M);
  for(int i = 0; i < k; i++) scanf("%d", &a[i]);

  long long l = -1, r = 1LL * M * N;

  vector<pair<long long, long long>> tmp;
  auto Check = [&](long long v) {
    tmp.clear();
    long long mn = 0, mx = 0;
    for(int i = 0; i < k; i++) {
      long long l = max(0LL, (1LL * M * a[i] - v + N - 1) / N);
      long long r = (1LL * M * a[i] + v) / N;
      mn += l;
      mx += r;
      tmp.emplace_back(l, r);
    }
    if(mn <= M && mx >= M) return 1;
    else return 0;
  };
  while(r - l > 1) {
    long long m = (l + r) >> 1;
    if(Check(m)) r = m;
    else l = m;
  }

  Check(r);
  vector<long long> b(k);
  long long sum = 0;
  for(int i = 0; i < k; i++) b[i] = tmp[i].first, sum += b[i];
  sum = M - sum;
  for(int i = 0; i < k; i++) if(sum > 0) {
    long long d = min(tmp[i].second - tmp[i].first, sum);
    b[i] += d, sum -= d;
  }

  for(int i = 0; i < k; i++) printf("%lld ", b[i]); puts("");

  return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    cout<<min(a,min(b,min(c,d)));
    return 0;
}

#include<iostream>
using namespace std;

int main() {
  int a[4],i;
  for(i=0;i<4;i++)
    cin>>a[i];
  int min=a[0];
  for(i=1;i<4;i++) {
    if(a[i]<min) min = a[i];
  }
  cout<<min;
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define INF 0x3f3f3f3f
#define pi M_PI
typedef pair<ll, ll> llPair;
typedef vector<ll> vll;
typedef vector<ld> vld;
typedef vector<bool> vb;
typedef priority_queue<ll> pqll;
ll MOD = 1000000007;
/*
So much for summer love and saying "us"
'Cause you weren't mine to lose
You weren't mine to lose, no
*/
int main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    ll t;
    t = 1;
    for (ll z = 0; z < t; ++z)
    {
        ll n, m;
        cin >> n >> m;
        vll v(n);
        for (ll i = 0; i < n; ++i)
        {
            cin >> v[i];
        }
        sort(v.begin(), v.end());
        vll forw(n / 2);
        for (ll i = 0; i < n / 2; ++i)
        {
            forw[i] = abs(v[2 * i] - v[2 * i + 1]);
        }
        vll back(n / 2);
        for (ll i = 0; i < n / 2; ++i)
        {
            back[i] = abs(v[(n - 1) - 2 * i] - v[(n - 1) - 2 * i - 1]);
        }
        vll preff(n / 2 + 1, 0);
        vll prefb(n / 2 + 1, 0);
        for (ll i = 0; i < n / 2; ++i)
        {
            preff[i + 1] = preff[i] + forw[i];
            prefb[i + 1] = prefb[i] + back[i];
        }
        ll res = 1000000000000000000;
        for (ll i = 0; i < m; ++i)
        {
            ll h;
            cin >> h;
            ll ans = -1;
            if (h <= v[0])
            {
                ans = 0;

            }
            else if (h >= v[n - 1])
            {
                ans = n;
            }
            else
            {
                ll l = 0;
                ll r = n - 1;
                while (l <= r)
                {
                    ll m = l + (r - l) / 2;
                    if (v[m] >= h)
                    {
                        ans = m;
                        r = m - 1;
                    }
                    else l = m + 1;
                }
            }
            if (ans % 2 == 0)
            {
                ll temp = 0;
                temp += preff[ans / 2];
                temp += prefb[(n + 1) / 2 - (ans / 2) - 1];
                temp += abs(h - v[ans]);
                res = min(res, temp);
            }
            else
            {
                ll temp = 0;
                temp += preff[ans / 2];
                temp += prefb[(n + 1) / 2 - (ans / 2) - 1];
                temp += abs(h - v[ans - 1]);
                res = min(res, temp);
            }
        }
        cout << res << '\n';
    }

    return 0;
}

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <cmath>
#include <climits>
#include <iomanip>
#include <set>
#include <map>
using namespace std;
typedef long long ll;
int main(){
    ll n,m;
    cin >> n >> m;
    vector<ll> h(n);
    vector<ll> w(m);
    for(int i = 0;i < n;i++)cin >> h[i];
    for(int i = 0;i < m;i++)cin >> w[i];
    sort(h.begin(),h.end());
    sort(w.begin(),w.end());

    vector<ll> cost(n + 1);//i番目の隙間に先生を入れた時 先生はi/2組目
    vector<ll> part(n + 1);//,,　先生と組む人
    ll back = 0;
    for(int i = n - 1;i >= 1;i--){
        if(i % 2 == 0)back += h[i] - h[i - 1];
    }
    ll nowpart = -2;
    ll front = 0;
    for(int i = 0;i < n + 1;i++){
        if(i % 2 == 0){
            nowpart += 2;
            if(i != 0){
                front += h[i - 1] - h[i - 2];
                back -= h[i] - h[i - 1];
            }
        }
        part[i] = nowpart;
        cost[i] = front + back;
      //cout << i << " " << front << " " << back << " " << cost[i] << endl;
    }

  //cout << part[0] << part[1] << part[2] << part[3] << part[4] << part[5] << endl;
  //cout << cost[0] << cost[1] << cost[2] << cost[3] << endl;

    ll res = pow(10,18);
    ll it = 0;
    for(int i = 0;i < m;i++){
        while(1){
            if(w[i] > h[it] && it < n)it++;
            else break;
        }
      //cout << i << " " << h[part[it]] << w[i] << endl;
        res = min(res,cost[it] + abs(h[part[it]] - w[i]));
    }
    cout << res << endl;
}


#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using P=pair<ll,ll>;
ll N;
bool judge[400005];
ll ans[400005];
ll sum[400005];
ll A[400005];
void solve(){
    vector<P>AA(2*N);
    for(ll i=0;i<2*N;i++)AA[i]=P(A[i],i);
    sort(AA.begin(),AA.end());
    for(ll i=0;i<N;i++)judge[AA[i].second]=true;
for(ll i=1;i<=2*N;i++){
    if(judge[i-1])sum[i]=sum[i-1]+1;else sum[i]=sum[i-1]-1;
}for(ll i=1;i<=2*N;i++)sum[i]=abs(sum[i]);
string ans="";
for(ll i=1;i<=2*N;i++)
if(sum[i-1]<sum[i])ans+='(';else ans+=')';
cout<<ans<<endl;
}
int main(){
    cin>>N;
    for(ll i=0;i<2*N;i++)cin>>A[i];
solve();
}

// Problem: E - Unique Color
// Contest: AtCoder - AtCoder Beginner Contest 198
// URL: https://atcoder.jp/contests/abc198/tasks/abc198_e
// Memory Limit: 1024 MB
// Time Limit: 2000 ms
//
// Powered by CP Editor (https://cpeditor.org)

#include <bits/stdc++.h>
#define pb push_back
#define sz(a) int(a.size())
using namespace std;
typedef long long ll;

int read() {
	char ch=getchar();int x=0,f=1;
	while(ch<'0'||ch>'9') {if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9') {x=x*10+ch-'0';ch=getchar();}
	return x*f;
}

const int N=1e5+5;

vector<int> G[N],ans;

int book[N];
int c[N];
int n;

void dfs(int now,int fa) {
	if(!book[c[now]]) ans.pb(now);
	book[c[now]]++;
	for(int i=0;i<sz(G[now]);i++) {
		int to=G[now][i];
		if(to==fa) continue;
		dfs(to,now);
	}
	book[c[now]]--;
}

int main() {
	n=read();
	for(int i=1;i<=n;i++) c[i]=read();
	for(int i=1;i<=n-1;i++) {
		int x=read(),y=read();
		G[x].pb(y),G[y].pb(x);
	}
	dfs(1,0);
	sort(ans.begin(),ans.end());
	for(int i=0;i<sz(ans);i++) {
		printf("%d\n",ans[i]);
	}
	return 0;
}


#include <bits/stdc++.h>
#ifdef DEBUG
	#define D(x...) printf(x)
#else
	#define D(x...)
#endif
using namespace std;
typedef long long ll;
int a[4];
int main() {
	scanf("%d%d%d%d", &a[0], &a[1], &a[2], &a[3]);
	for (int i = 0; i < (1 << 4); i++) {
		int sum = 0;
		for (int j = 0; j < 4; j++) {
			if (i & (1 << j)) sum += a[j];
		}
		if (sum*2 == a[0] + a[1] + a[2] + a[3]) {
			printf("Yes\n");
			exit(0);
		}
	}
	printf("No\n");
}

#include <bits/stdc++.h>
//#include "debugger.h"
#define int long long
#define pb push_back
#define pp pop_back
#define f first
#define s second
#define all(x) x.begin(), x.end()
using namespace std;
const int nax = 1e6 + 5;

signed main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);

	int a, b, w;
	cin >> a >> b >> w;

	w = w * 1000;
	int mini = INT_MAX, maxi = INT_MIN;
	for (int i = 1; i <= nax; i++) {
		if ((a * i) <= w && (b * i >= w)) {
			mini = min (mini, i);
			maxi = max (maxi, i);
		}
	}
	if (mini == INT_MAX)
		cout << "UNSATISFIABLE";
	else
		cout << mini << " " << maxi;

	return 0;
}


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

int main(){
	int a,b,c,d; cin >> a >> b >> c >> d;
	if(c*d - b <= 0){
		cout << -1 << endl;
		return 0;
	}
	cout << (a+c*d-b-1)/(c*d-b) << endl;
}

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

// #define int long long
#define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i)
#define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define irep(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define ireps(i, m, n) for (int i = (int)(m); i <= (int)(n); ++i)
#define irreps(i, m, n) for (int i = ((int)(n)-1); i > (int)(m); ++i)
#define SORT(v, n) sort(v, v + n);
#define REVERSE(v, n) reverse(v, v+n);
#define vsort(v) sort(v.begin(), v.end());
#define all(v) v.begin(), v.end()
#define mp(n, m) make_pair(n, m);
#define cinline(n) getline(cin,n);
#define replace_all(s, b, a) replace(s.begin(),s.end(), b, a);
#define PI (acos(-1))
#define FILL(v, n, x) fill(v, v + n, x);
#define sz(x) (int)(x.size())

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vs = vector<string>;
using vpll = vector<pair<ll, ll>>;
using vtp = vector<tuple<ll,ll,ll>>;
using vb = vector<bool>;
using ld = long double;

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; }

template<class t> using vc=vector<t>;
template<class t> using vvc=vc<vc<t>>;

const ll INF = 1e9+10;
// const ll MOD = 1e9+7;
const ll MOD = 998244353;
const ll LINF = 1e18;

signed main()
{
  cin.tie( 0 ); ios::sync_with_stdio( false );

  ll a,b,c,d; cin>>a>>b>>c>>d;

  // 明らかに、b>cの場合は不可

  irep(i,1,1000000){
    if(a+b*i<=c*i*d){
      cout<<i<<endl;
      return 0;
    }
  }
  cout<<-1<<endl;
}


		//sometimes assume final ans and then approach prblm downward accordingly
		#include <bits/stdc++.h>
		// #include <boost/math/common_factor.hpp>
		using namespace std;
		#define ll long long
		#define MOD 1000000007
		#define init ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
		#define test ll t; cin>>t; while(t--)
		// #define ll long long
		#define INF 1000000000000000005
		#define pb push_back
		#define pi 3.1415926
		#define MAX 8000000000000000064ll
		#define MIN -8000000000000000064ll
		#define endl "\n"

		// ll fpow(ll x, ll y, ll p = MOD) {
		// 	x = x % p; ll sum = 1; while (y) {
		// 		if (y & 1)sum = sum * x; sum %= p; y = y >> 1; x = x * x; x %= p;
		// 	} return sum;
		// }

		// ll fact[3000007] = {0};
		// void facto() {
		// 	fact[0] = 1; fact[1] = 1; for (ll i = 2; i < 3000007; i++)fact[i] = (fact[i - 1] * i) % MOD;
		// }
		// ll ncr(ll n, ll r) {
		// 	if (r > n)return 0;
		// 	ll res = 1; res = fact[n]; res = (res * (fpow(fact[r], MOD - 2))) % MOD; res = (res * (fpow(fact[n - r], MOD - 2))) % MOD; return res;
		// }
		// ll npr(ll n, ll r) {
		// 	if (r > n)return 0;
		// 	ll res = 1; res = fact[n]; res = (res * (fpow(fact[n - r], MOD - 2))) % MOD; return res;
		// }

		ll add(ll a, ll b) { return (a % MOD + b % MOD + ((MAX) / MOD) * MOD) % MOD; }
		ll sub(ll a, ll b) { return (a % MOD - b % MOD + ((MAX) / MOD) * MOD) % MOD; }
		ll mul(ll a, ll b) { return ((a % MOD) * (b % MOD) + ((MAX) / MOD) * MOD) % MOD; }

		// ll expomod(ll x,ll y){
		// 	ll result = 1;
		// 	x %= MOD;
		// 	while(y>0){
		// 		if(y & 1){
		// 			result = (1ll * result * x) % MOD;
		// 		}
		// 		y = y >> 1;
		// 		x = (1ll * x* x) % MOD;
		// 	}
		// 	return result;
		// }

		vector<int> in1(int n) {
			vector<int>v1;
			v1.resize(n+1); for (ll i = 1; i <=n; i++){ cin >> v1[i];}
			return v1;
		}
		vector<int> in0(int n) {
			vector<int>v1;
			v1.resize(n); for (ll i = 0; i <n; i++){ cin >> v1[i];}
			return v1;
		}

		// ll f[35];
		// ll ans,f1;
		// void add(ll x) {
		// 	for (ll i = 31; i >= 0; i--) {
		// 		if (x & (1ll << i)) {
		// 			f[i]+=1;
		// 		}
		// 	}
		// }
		// void remove(ll x) {
		// 	for (ll i = 31; i >= 0; i--) {
		// 		if (x & (1ll << i)) {
		// 			f[i]--;
		// 			if (f[i] == 0) {
		// 				ans ^= (1ll << i);
		// 			}
		// 		}

		// 	}
		// }
		// //x << y -> x = x*(2^y)
		// //x >> y -> x = x/(2^y)
		// //cout<<fixed<<setprecision(x)

		// //dijkstras
		// map<ll,ll>m1;
		// void dijkstras(vector<pair<ll,ll>>adj[],vector<double>&d,vector<ll>p,ll start){
		// 	d[start] = 0;
		// 	using pii = pair<ll,ll>;
		// 	priority_queue<pii,vector<pii>,greater<pii>>q;
		// 	q.push({0,start});

		// 	while(!q.empty()){
		// 		ll v = q.top().second;
		// 		ll d_v = q.top().first;
		// 		// cout<<v<<d_v<<endl;
		// 		q.pop();

		// 		// if(d_v!=d[v])
		// 		// continue;

		// 		for(auto p:adj[v]){

		// 			ll to = p.first;
		// 			ll len = p.second;

		// 			double cur = d[v]/2;
		// 			cur+=len;
		// 			if(m1[to]){
		// 				if(cur>(m1[to]+1)){
		// 					cur = m1[to]+1;
		// 				}
		// 			}
		// 			if(cur<d[to]){
		// 				d[to] = cur;
		// 				q.push({d[to],to});
		// 			}
		// 		}
		// 	}
		//
		vector<bool> is_prime;
		void seive(ll n){
			is_prime[0] = is_prime[1] = false;
			for (ll i = 2; i <= n; i++) {
				if (is_prime[i] && (long long)i * i <= n) {
					for (ll j = i * i; j <= n; j += i)
						is_prime[j] = false;
				}
			}
		}
		// string s1 = "";
		vector<ll>hts;
		bool ok(ll mid,ll n,ll l,ll r){
			ll cnt = 0;
			for(auto ele:hts){
				if(ele>=mid) cnt+=1;
			}
			return (cnt>=l)?true:false;
		}
		void go() {
			int a,b,c,d;
			cin>>a>>b>>c>>d;
			if(c*d-b <= 0) cout<<-1<<endl;
			else{
				int q = a/(c*d-b);
				int rem = a%(c*d-b);
				if(rem>0) q+=1;
				cout<<q<<endl;
			}
		}

		signed main() {
			init
			// test{
			// 	go();
			// }

			go();
		}

#include<iostream>
#include<vector>
using namespace std;
typedef long long li;
#define MOD 1000000007
#define rep(i,n) for(int i=0;i<(n);i++)
#define df 0
template<class T> void print(const T& t){ cout << t << "\n"; }
template<class T, class... Ts> void print(const T& t, const Ts&... ts) { cout << t; if (sizeof...(ts)) cout << " "; print(ts...); }
// Container コンテナ型, map以外
template< template<class ...> class Ctn,class T>
std::ostream& operator<<(std::ostream& os,const Ctn<T>& v){
  auto itr=v.begin();
  while(itr!=v.end()){
    if(itr!=v.begin())cout << " ";
    cout << *(itr++);
  }
  return os;
};
struct modint{
  li num;

  modint(li a=0){
    num=(a%MOD+MOD)%MOD;
  }
  modint operator+(modint a) {return{(num+a.num)%MOD};}
  modint operator-(modint a) {return{((num-a.num)%MOD+MOD)%MOD};}
  modint operator*(modint a) {return{num*a.num%MOD};}
  modint& operator+=(modint a) {
    (num += a.num)%=MOD;
    return *this;
  }
  modint& operator-=(modint a) {
    (num += MOD-a.num)%=MOD;
    return *this;
  }
  modint& operator*=(modint a) {
    (num*=a.num)%=MOD;
    return *this;
  }
};

std::ostream& operator<<(std::ostream& os, const modint& m){
  // ここでストリームに obj を書き込みます。
  li a=m.num;
  a%=MOD;
  a+=MOD;
  a%=MOD;
  cout << a;
  return os;
}

std::istream& operator>>(std::istream& os,modint& m){
  // ここでストリームに obj を書き込みます。
  li a; cin >>a;
  m=a;
  return os;
}
// modint inv(modint a){
//     // unordered_map 必須 O(1)
//     static unordered_map<li,modint> f;
//     f[1]=1;
//     if(f.find(a.num)!=f.end())return f[a.num];
//     modint m=MOD%a.num;
//     return f[a.num]=(modint)(MOD/a.num*(-1))*inv(m);
// }

modint pow(modint a,int r){
  modint b=a,ans=1;
  while(r){
    if(r%2) ans*=b;
    b*=b;
    r/=2;
  }
  return ans;
}

modint inv(modint a){
  // MOD: prime
  return pow(a,MOD-2);
}
modint operator/(modint a,modint b) {return a*inv(b);}
modint& operator/=(modint& a,modint b){
  a*=inv(b);
  return a;
}

struct matrix{
  vector<vector<modint>> mat;
  matrix(int n,modint m=0){
    mat.resize(n,vector<modint>(n));
    rep(i,n) mat[i][i]=m;
  }

  matrix& operator/=(modint b){
    for(auto& v:mat)for(auto& x:v) x/=b;
    return *this;
  }
  matrix& operator*=(matrix b){
    int n=mat.size();
    matrix ret={n};
    rep(i,n) rep(j,n) rep(k,n) ret.mat[i][j]+=mat[i][k]*b.mat[k][j];
    mat=ret.mat;
    return *this;
  }
  vector<modint> operator*(vector<modint>& v){
    int n=v.size();
    vector<modint> ret(n);
    rep(i,n) rep(j,n) ret[i]+=mat[i][j]*v[j];
    return ret;
  }

};

matrix pow(matrix a,int r){
  int n=a.mat.size();
  matrix b=a,ans={n,1};
  while(r){
    if(r%2) ans*=b;
    b*=b;
    r/=2;
  }
  return ans;
}

std::ostream& operator<<(std::ostream& os,const matrix& m){
  for(auto x:m.mat) print(x);
  return os;
};

int main(){
  int n,m,k; cin >>n >>m >>k;

  vector<modint> v(n);
  rep(i,n) cin >>v[i];
  matrix E(n,m*2);
  if(df)print(E);
  rep(i,m){
    int a,b; cin >>a >>b; a--; b--;
    E.mat[a][b]+=1;
    E.mat[b][a]+=1;
    E.mat[a][a]-=1;
    E.mat[b][b]-=1;
  }
  if(df)print(E);
  E/=m*2;
  if(df)print(E);
  v=pow(E,k)*v;
  for(auto x:v) print(x);
}


#include<bits/stdc++.h>
#include<algorithm>
#define int long long
using namespace std;
signed main(){
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	//MessageBox(GetForegroundWindow(),"标题","内容",MB_YESNO);
	int n,i;
	cin>>n;
	int sum=0;
	for(i=1;i<=n;i++){
		sum+=i;
		if(sum>=n){
			break;
		}
	}
	cout<<i;
	return 0;
}

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

#define ll long long int
#define pi acos(-1)
#define pb push_back
#define mp make_pair
#define rip() for(ll i=0;i<n;i++)
#define rip1() for(ll i=n-1;i>=0;i--)
#define cin(a) cin>>a
#define cout(a) cout<<a
#define nl '\n'

///Chess moves.........
// int dx[] = {+0, +0, -1, +1}; ///Up-down, Left-Right
 //int dy[] = {+1, -1, +0, +0};
// int dx[] = {+0,+0,+1,-1,-1,+1,-1,+1}; ///King's Move
// int dy[] = {-1,+1,+0,+0,+1,+1,-1,-1};
// int dx[] = {-2, -2, -1, -1,  1,  1,  2,  2}; ///Knight's Move
// int dy[] = {-1,  1, -2,  2, -2,  2, -1,  1};

ll gcd(ll a, ll b){ while (b){ a %= b; swap(a, b);} return a;}
ll lcm(ll a, ll b){ return (a/gcd(a, b)*b);}

ll bigmod(ll a,ll b, ll mod)
{
    b%=(mod-1);
    ll result=1ll;
    while(b>0ll){
        if(b&1ll) result=result*a%mod;
        a=a*a%mod;
        b>>=1ll;
    }
    return result;
}

ll inverse(ll a, ll M){
	if(gcd(a, M)==1) return bigmod(a, M-2, M) % M;
	return 1;
}
ll ncr(ll a, ll b, ll mod){ ll x = max(a-b, b), ans=1; for(ll K=a, L=1; K>=x+1; K--, L++){ ans = ans * K % mod; ans = ans * inverse(L, mod) % mod;} return ans;}

ll prime(ll n)
{
    ll cnt=0;
    while(n%2==0){
        n/=2;
        cnt++;
    }
    for(ll i=3;i*i<=n;i+=2){
        if(n%i==0){
            while(n%i==0){
                n/=i;
                cnt++;
            }
        }
    }
    if(n>1) cnt++;
    return cnt;
}

ll fact(ll n,ll mod)
{
    ll res=1;
    for(ll i=2;i<=n;i++){
        res=(res%mod*i%mod)%mod;
    }
    return res;
}

void urmi()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

int main()
{
    urmi();
    /*#ifdef _DEBUG
	freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif*/
    ll t=1;
    //cin>>t;
    while(t--){
        ll n,s=0,c;
        cin>>n;
        for(ll i=1;;i++){
            s+=i;
            if(s>=n){
                cout<<i<<endl;
                return 0;
            }
        }
    }
}


#include <bits/stdc++.h>
using namespace std;
long long INF = 1LL<<60;
using ll = long long;
using vll = vector<ll>;
using mll = map<ll, ll>;
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }

void solve(long long N, long long X, std::vector<long long> A){
    vll B;
    rep(i, 0, N){
        if(X != A[i]) B.push_back(A[i]);
    }
    rep(i, 0, B.size()){
        if(i == 0) cout << B[i];
        else cout << " " << B[i];
    }
    cout << endl;
}

int main(){
    long long N;
    scanf("%lld",&N);
    long long X;
    scanf("%lld",&X);
    std::vector<long long> A(N);
    for(int i = 0 ; i < N ; i++){
        scanf("%lld",&A[i]);
    }
    solve(N, X, std::move(A));
    return 0;
}

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

template <typename A, typename B>
string to_string(pair<A, B> p);

template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);

template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);

string to_string(const string& s) {
  return '"' + s + '"';
}

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

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

string to_string(vector<bool> v) {
  bool first = true;
  string res = "{";
  for (int i = 0; i < static_cast<int>(v.size()); i++) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(v[i]);
  }
  res += "}";
  return res;
}

template <size_t N>
string to_string(bitset<N> v) {
  string res = "";
  for (size_t i = 0; i < N; i++) {
    res += static_cast<char>('0' + v[i]);
  }
  return res;
}

template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto &x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}

template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")";
}

template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}

void debug_out() { cerr << endl; }

template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

#define fi first
#define se second
#define pb push_back
#define mod(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define forn(i,a,b) for(int i = a; i < b; i++)
#define forr(i,a,b) for(int i = a; i >= b; i--)
#define all(x) (x).begin(), (x).end()

typedef long long ll;
typedef long double ld;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

const ll mod = 1e9+7;
ll mul(ll a,ll b){return ((a%mod)*(b%mod))%mod;}
ll sum(ll a,ll b){return ((a%mod)+(b%mod))%mod;}
ll sub(ll a,ll b){return ((a%mod)-(b%mod))%mod;}
ll power(ll a,ll b){
	ll res = 1;
	while(b){
		if(b&1)res = mul(res,a);
		b >>= 1;
		a = mul(a,a);
	}
	return res;
}

int main(){
	ios_base::sync_with_stdio(0); cin.tie(0);
	ll S,P; cin >> S >> P;
	for(ll i = 1; i*i <= P; i++){
		if(P%i == 0){
			ll N = i;
			ll M = P/i;
			if(N+M == S){
				cout << "Yes\n";
				return 0;
			}
		}
	}
	cout << "No\n";
	return 0;
}
/*
__builtin_mul_overflow(x,y,&x)
-fsplit-stack
*/


#include<stdio.h>
int main() {
	int a, b;
	scanf("%d%d", &a, &b);
	if (a < b) {
		if (a + 3 > b)
			printf("Yes\n");
		else
			printf("No\n");
	}
	else
		if (a > b) {
			if (b + 3 > a)
				printf("Yes\n");
			else
				printf("No\n");
		}
}

#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
// #include<ext/pb_ds/assoc_container.hpp>
// #include<ext/pb_ds/tree_policy.hpp>
// #include<ext/pb_ds/tag_and_trait.hpp>
// using namespace __gnu_pbds;
// #include<boost/multiprecision/cpp_int.hpp>
// namespace multiprecisioninteger = boost::multiprecision;
// using cint=multiprecisioninteger::cpp_int;
using namespace std;
using ll=long long;
#define double long double
using datas=pair<ll,ll>;
using ddatas=pair<double,double>;
using tdata=pair<ll,datas>;
using vec=vector<ll>;
using mat=vector<vec>;
using pvec=vector<datas>;
using pmat=vector<pvec>;
// using llset=tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>;
#define For(i,a,b) for(i=a;i<(ll)b;++i)
#define bFor(i,b,a) for(i=b,--i;i>=(ll)a;--i)
#define rep(i,N) For(i,0,N)
#define rep1(i,N) For(i,1,N)
#define brep(i,N) bFor(i,N,0)
#define brep1(i,N) bFor(i,N,1)
#define all(v) (v).begin(),(v).end()
#define allr(v) (v).rbegin(),(v).rend()
#define vsort(v) sort(all(v))
#define vrsort(v) sort(allr(v))
#define endl "\n"
#define eb emplace_back
#define print(x) cout<<x<<endl
#define printyes print("Yes")
#define printno print("No")
#define printYES print("YES")
#define printNO print("NO")
#define output(v) do{bool f=0;for(auto outi:v){cout<<(f?" ":"")<<outi;f=1;}cout<<endl;}while(0)
#define matoutput(v) do{for(auto outimat:v)output(outimat);}while(0)
const ll mod=1000000007;
// const ll mod=998244353;
const ll inf=1LL<<60;
const double PI=acos(-1);
const double eps=1e-9;
template<class T,class E> ostream& operator<<(ostream& os,pair<T,E>& p){return os<<"{"<<p.first<<","<<p.second<<"}";}
template<class T> inline bool chmax(T& a,T b){bool x=a<b;if(x)a=b;return x;}
template<class T> inline bool chmin(T& a,T b){bool x=a>b;if(x)a=b;return x;}

void startupcpp(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout<<fixed<<setprecision(15);
}

double distance(ddatas x,ddatas y){
  double a=x.first-y.first,b=x.second-y.second;
  return sqrt(a*a+b*b);
}

ll modinv(ll a,ll m=mod) {
  ll b=m,u=1,v=0,t;
  while(b){
    t=a/b;
    a-=t*b; swap(a,b);
    u-=t*v; swap(u,v);
  }
  return (u+m)%m;
}

ll moddevide(ll a,ll b){return (a*modinv(b))%mod;}

vec modncrlistp,modncrlistm;

ll modncr(ll n,ll r){
  if(n<r)return 0;
  ll i,size=modncrlistp.size();
  if(size<=n){
    modncrlistp.resize(n+1);
    modncrlistm.resize(n+1);
    if(!size){
      modncrlistp[0]=modncrlistm[0]=1;
      size++;
    }
    For(i,size,n+1){
      modncrlistp[i]=modncrlistp[i-1]*i%mod;
      modncrlistm[i]=modinv(modncrlistp[i]);
    }
  }
  return modncrlistp[n]*modncrlistm[r]%mod*modncrlistm[n-r]%mod;
}

ll modpow(ll a,ll n,ll m=mod){
  ll res=1;
  while(n>0){
    if(n&1)res=res*a%m;
    a=a*a%m;
    n>>=1;
  }
  return res;
}

ll gcd(ll a,ll b){if(!b)return abs(a);return (a%b==0)?abs(b):gcd(b,a%b);}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}

ll countdigits(ll n){
  ll ans=0;
  while(n){n/=10;ans++;}
  return ans;
}

ll sumdigits(ll n){
  ll ans=0;
  while(n){ans+=n%10;n/=10;}
  return ans;
}
ll N,M,K,H,W,A,B,C,D;
string s,t;
ll ans;
int main(){
  startupcpp();
  // int codeforces;cin>>codeforces;while(codeforces--){
  ll i,j;
  cin>>A>>B;
  print((A+B)/2<<" "<<(A-B)/2);
  // }
}