//  Copyright © 2020 Diego Garcia Rodriguez del Campo. All rights reserved.
#include<bits/stdc++.h>
#define MAX 105
#define optimiza_io cin.tie(0); ios_base::sync_with_stdio(0);
#define what_is(x) cerr << #x << " is " << x << endl;
#define pii pair <ll, ll>
#define fi first
#define se second
using namespace std;
typedef long long ll;

const ll INF = 1e13;
ll N, X, a[MAX], ans, rnd, M;
ll vis[MAX][MAX][MAX];
ll memo[MAX][MAX][MAX];

ll dp(ll i, ll k, ll md) {
    if(i > N) {
        if(md or k)
            return -INF;
        return 0;
    }
    if(vis[i][k][md] == rnd)
        return memo[i][k][md];

    // NOPE
    ll ans = dp(i + 1, k, md);
    // YEP
    if(k > 0)
        ans = max(ans, dp(i + 1, k - 1, (md + a[i]) % M) + a[i]);
    vis[i][k][md] = rnd;
    return memo[i][k][md] = ans;
}

int main() {
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin) ;
    freopen("output.txt", "w", stdout) ;
    #endif
    optimiza_io
    cin >> N >> X;
    for(ll i = 1; i <= N; i ++)
        cin >> a[i];
    sort(a + 1, a + N + 1);
    ans = X - a[N];

    for(ll i = 2; i <= N; i ++) {
        rnd++;
        M = i;
        ll st = (i - (X % i)) % i;
        ll can = dp(1, i, st);
        if(can > 0)
            ans = min(ans, (X - can) / i);
    }

    cout << ans << "\n";
    return 0;
}

// CHECAR LIMITES

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

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

vector<string> vec_splitter(string s) {
	s += ',';
	vector<string> res;
	while(!s.empty()) {
		res.push_back(s.substr(0, s.find(',')));
		s = s.substr(s.find(',') + 1);
	}
	return res;
}

void debug_out(
vector<string> __attribute__ ((unused)) args,
__attribute__ ((unused)) int idx,
__attribute__ ((unused)) int LINE_NUM) { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(vector<string> args, int idx, int LINE_NUM, Head H, Tail... T) {
	if(idx > 0) cerr << ", "; else cerr << "Line(" << LINE_NUM << ") ";
	stringstream ss; ss << H;
	cerr << args[idx] << " = " << ss.str();
	debug_out(args, idx + 1, LINE_NUM, T...);
}

#ifdef LOCAL
#define debug(...) debug_out(vec_splitter(#__VA_ARGS__), 0, __LINE__, __VA_ARGS__)
#else
#define debug(...) 42
#endif

double get_time() {
	return 1.0 * clock() / CLOCKS_PER_SEC;
}

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

	vector<vector<int>> a(n, vector<int>(n));
	for(int i = 0; i < n; i++) {
		for(int j = 0; j < n; j++)
			cin >> a[i][j];
	}

	int w = (k*k + 1) / 2;

	auto can = [&] (int x) {
		auto b = a;
		for(int i = 0; i < n; i++) {
			for(int j = 0; j < n; j++) {
				if(b[i][j] <= x)
					b[i][j] = 1;
				else
					b[i][j] = 0;
			}
		}

		// is there a k x k submatrix of b with sum >= w?

		vector<vector<int>> pref(n + 1, vector<int>(n + 1));
		for(int i = 0; i < n; i++) {
			for(int j = 0; j < n; j++) {
				pref[i + 1][j] = pref[i][j] + b[i][j];
			}
		}

		for(int i = 0; i < n + 1 - k; i++) {
			int sum = 0;
			for(int a = 0; a < k; a++) {
				sum += pref[i + k][a] - pref[i][a];
			}

			debug(i + 1, x, sum);
			for(int j = 0; j < n + 1 - k; j++) {
				debug(x, i + 1, j + 1, sum);
				if(sum >= w) {
					debug(x, i + 1, j + 1, sum);
					return true;
				}
				if(j + k < n) {
					sum -= pref[i + k][j] - pref[i][j];
					sum += pref[i + k][j + k] - pref[i][j + k];
				}
			}
		}

		return false;
	};

	debug(can(4));

	int lo = 0, hi = 1E9 + 5;

	 while(lo < hi) {
	 	int mid = (lo + hi) / 2;
	 	if(can(mid))
	 		hi = mid;
	 	else
	 		lo = mid + 1;
	 }

	 assert(can(lo));

	 cout << lo << '\n';
}


#include<iostream>
#include<string>
#include<algorithm>
#include<cmath>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<iomanip>
#include<tuple>
#include<cstring>
#include<bitset>

#define REP(i,n) for(ll i=0;i<(ll)n;i++)
#define ALL(x) (x).begin(),(x).end()
#define SZ(x) ((ll)(x).size())
#define pb push_back
#define eb emplace_back

#define INF 1000000000
#define INFLL 1000000000000000000LL

using namespace std;

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

using ll = long long;
using PP = pair<ll, ll>;

#define MAX_N 200000

ll N;
PP x[MAX_N], y[MAX_N];
vector<ll> ans;
map<PP, ll> mp;

int main() {

	cin >> N;
	REP(i, N) {
		cin >> x[i].first >> y[i].first;
		x[i].second = i;
		y[i].second = i;
	}

	sort(x, x + N);
	sort(y, y + N);

	REP(i, 10)REP(j, 10) {
		if (i < N && 0 <= N - j && N - j < N && i != N - j) {
			ll f =max(x[i].second, x[N - j].second);
			ll s = min(x[i].second, x[N - j].second);
			chmax(mp[{f, s}], abs(x[i].first - x[N - j].first));
			f = max(y[i].second, y[N - j].second);
			s = min(y[i].second, y[N - j].second);
			chmax(mp[{f, s}], abs(y[i].first - y[N - j].first));
		}
	}

	for (auto&& m : mp) {
		ans.push_back(m.second);
	}

	sort(ALL(ans));

	cout << ans[SZ(ans) - 2] << endl;

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define mod 998244353

void __print(int x) {cerr << x;}
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

ll binpow(ll x,ll y)/* (x^y)%p in O(log y) */{ll res=1;while (y > 0){if(y&1)res=(res*x);y = y>>1;x=(x*x);}return res;}
ll binpowmod(ll x,ll y,ll p)/* (x^y)%p in O(log y) */{ll res=1;x=x%p;while (y > 0){if(y&1)res=(res*x)%p;y = y>>1;x=(x*x)%p;}return res;}
ll mod_inverse(ll n,ll p)/* Returns n^(-1) mod p */{return binpowmod(n,p-2,p);}
ll gcd(ll x,ll y)
{
    if(y==0)
        return x;
    return gcd(y,x%y);
}

bool isPowerOfTwo (ll x)
{
    /* First x in the below expression is for the case when x is 0 */
    return x && (!(x&(x-1)));
}

void swap(int &x,int &y){
    int temp = x;
    x = y;
    y = temp;
}

unsigned int onesComplement(unsigned int n)
{
   // Find number of bits in the given integer
   int number_of_bits = floor(log2(n))+1;

   // XOR the given integer with poe(2,
   // number_of_bits-1 and print the result
   return ((1 << number_of_bits) - 1) ^ n;
}

bool comp1(pair<int,int> x, pair<int,int> y)
{
    return x.second < y.second;
}

// class cmp      //comrootator for priority_queue
// {               //declaration: priority_queue<int,vector<int>,cmp>
// public:
//     bool operator()(E& A,E& B)
//     {
//         // if(A.first == B.first)
//         //     return A.second < B.second;
//         return A.wt > B.wt;
//     }
// };

void solve(){
    int n;
    cin >> n;
    vector<pair<ll,ll>> xy;
    for(int i = 0; i < n; ++i) {
        ll x, y; cin >> x >> y;
        xy.push_back({x, y});
    }
    sort(xy.begin(), xy.end());
    vector<ll> ans;
    for(int i = 1; i < n; ++i) {
        ll dist = max(abs(xy[i].first - xy[0].first), abs(xy[i].second - xy[0].second));
        ans.push_back(dist);
    }
    for(int i = n - 2; i >= 1; --i) {
        ll dist = max(abs(xy[i].first - xy[n - 1].first), abs(xy[i].second - xy[n - 1].second));
        ans.push_back(dist);
    }
    xy.pop_back();
    reverse(xy.begin(), xy.end());
    xy.pop_back();
    sort(xy.begin(), xy.end(),[](pair<ll,ll>& p, pair<ll,ll>& q){
        return p.second < q.second;
    });

    if(xy.size() >= 2) {
        n = xy.size();
        for(int i = 1; i < n; ++i) {
            ll dist = max(abs(xy[i].first - xy[0].first), abs(xy[i].second - xy[0].second));
            ans.push_back(dist);
        }
        for(int i = n - 2; i >= 1; --i) {
            ll dist = max(abs(xy[i].first - xy[n - 1].first), abs(xy[i].second - xy[n - 1].second));
            ans.push_back(dist);
        }
    }

    sort(ans.begin(), ans.end(), greater<ll>());
    cout << ans[1];

}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout << fixed << setprecision(15);
    // int t;
    // cin >> t;
    // while(t--){
    //     solve();
    // }
    solve();

}


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

int main()
{
	int n;
    cin >> n;

    vector<long long> ref(200, 0);
    vector<int> arr(n);
    rep(i, n) {
        cin >> arr[i];
        ref[arr[i] % 200]++;
    }

    long long ans = 0;
    rep(i, 200) ans += ref[i]*(ref[i]-1) / 2;

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

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n,ans;
int main(){
	cin>>n;
	for(ll i=1;i*i<=n+n;i++){
		ll S=n+n-i*(i-1);
		if(S%(i+i)!=0)continue;
		ll l=S/(i+i);
		if(l<=0)continue;
		ans++;
	}
	ans<<=1;
	cout<<ans<<endl;
	return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<long long> Vll;
ll mm=1000000000;ll MM=mm+7;
#define rep(i, n) for(int i=0;i<n;i++)
#define PI 3.141592653589793

struct UnionFind{
        vector<int> par;         // par[自分]=親
        UnionFind(ll N) :par(N){
            rep(i,N) par[i]=i;
        }
    int root(int x){ //データxの木の根を得る
        if(par[x] ==x)return x;
        return par[x]=root(par[x]);
    }
    void unite(int x,int y){ // xとyの木を併合
        int rx=root(x);
        int ry=root(y);
        if(rx==ry)return;
        par[rx]=ry;
    }

    bool same(int x,int y){ //x,yの木の根が同じならtrueを返す
        int rx=root(x);
        int ry=root(y);
        return rx==ry;
    }

};

int main(){
    ll n,m;
    cin >> n >> m;
    Vll a(n),b(n);
    rep(i,n)cin >>a[i];
    rep(i,n)cin >> b[i];
    UnionFind tree(n);
    rep(i,m){
        ll c,d;
        cin >> c>> d;
        tree.unite(c-1,d-1);
    }
    map<ll,ll > aa,bb;
    rep(i,n){
        if(aa.count(tree.root(i))){
            aa[tree.root(i)]+=a[i];
            bb[tree.root(i)]+=b[i];
        }
        else{
            aa[tree.root(i)]=a[i];
            bb[tree.root(i)]=b[i];
        }
    }
    bool ans=true;
    for(auto p: aa){
        ll x=p.first;
        if(aa[x]==bb[x])continue;
        else {
            ans=false;
            break;
        }
    }
    if(ans)cout << "Yes" << endl;
    else cout << "No" << endl;

}

#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <cstring>
#include <iomanip>
#include <cassert>

using namespace std;
typedef long long ll;

int N, M;
vector<ll> A;
vector<ll> B;
vector<int> edge[200010];
bool arrived[200010];
pair<ll, ll> dfs(int cur)
{
   pair<ll, ll> ret = {A[cur], B[cur]};
   arrived[cur] = true;
   for (int i = 0; i < (int)edge[cur].size(); i++)
   {
      int nxt = edge[cur][i];
      if (arrived[nxt] == false)
      {
         pair<ll, ll> p = dfs(nxt);
         ret.first += p.first;
         ret.second += p.second;
      }
   }
   //cout << cur << " " << ret.first << " " << ret.second << endl;
   return ret;
}

int main()
{
   cin >> N >> M;
   for (int i = 0; i < N; i++)
   {
      int a;
      cin >> a;
      A.emplace_back(a);
   }
   for (int i = 0; i < N; i++)
   {
      int b;
      cin >> b;
      B.emplace_back(b);
   }
   for (int i = 0; i < M; i++)
   {
      int c, d;
      cin >> c >> d;
      c--;
      d--;
      edge[c].emplace_back(d);
      edge[d].emplace_back(c);
   }
   memset(arrived, false, sizeof(arrived));
   for (int i = 0; i < N; i++)
   {
      if (arrived[i] == false)
      {
         pair<ll, ll> p = dfs(i);
         if (p.first != p.second)
         {
            cout << "No" << endl;
            return 0;
         }
      }
   }
   cout << "Yes" << endl;
   return 0;
}


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

#define rep(i,n) for(int i=0; i<(n); i++)
#define rep2(i,x,n) for(int i=x; i<(n); i++)
#define all(x) x.begin(),x.end()
typedef long long ll;
ll mod = 1000000007;
ll inf = 1e18;
int main(){

    int n;
    cin >> n;
    vector<int> a(n),b(n),c(n),d(n),e(n);
    rep(i,n) cin >> a[i] >> b[i] >> c[i] >> d[i] >> e[i];
    vector<int> ftest(n,0),ff(n,0);

    rep(i,n){
        for(int j=i+1; j<n; j++){
            if(a[i]>=a[j] && b[i]>=b[j] && c[i]>=c[j] && d[i]>=d[j] && e[i]>=e[j]) ftest[j]--;
            if(a[i]<=a[j] && b[i]<=b[j] && c[i]<=c[j] && d[i]<=d[j] && e[i]<=e[j]) ftest[i]--;

            if(a[i]==a[j] && b[i]==b[j] && c[i]==c[j] && d[i]==d[j] && e[i]==e[j]){
                ff[i]++;ftest[j]=-3; ff[j]=-10000;
            }
        }
    }

    vector<int> fc;
    rep(i,n) {
        if(ftest[i]>=-2) fc.push_back(i);
        if(ff[i]==1){
            rep(i,2) fc.push_back(i);
        }
        if(ff[i]>=2){
            rep(i,3) fc.push_back(i);
        }
    }

    int m=fc.size();
    // cout << m << endl;
    int ans=1;

    rep(i,m){
        for(int j=i+1; j<m; j++){
            for(int k=j+1; k<m; k++){
                int pp=max(a[fc[i]],max(a[fc[j]],a[fc[k]]));
                int ss=max(b[fc[i]],max(b[fc[j]],b[fc[k]]));
                int tt=max(c[fc[i]],max(c[fc[j]],c[fc[k]]));
                int cc=max(d[fc[i]],max(d[fc[j]],d[fc[k]]));
                int hh=max(e[fc[i]],max(e[fc[j]],e[fc[k]]));
                int allp=min(pp,min(ss,min(tt,min(cc,hh))));
                ans=max(ans,allp);
            }
        }
    }
    cout << ans << endl;
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#ifdef tabr
#include "library/debug.cpp"
#else
#define debug(...)
#endif

template <long long mod>
struct modular {
    long long value;
    modular(long long x = 0LL) {
        value = x % mod;
        if (value < 0LL) value += mod;
    }
    modular& operator+=(modular other) {
        if ((value += other.value) >= mod) value -= mod;
        return *this;
    }
    modular& operator-=(modular other) {
        if ((value -= other.value) < 0LL) value += mod;
        return *this;
    }
    modular& operator*=(modular other) {
        value = value * other.value % mod;
        return *this;
    }
    modular& operator/=(modular other) {
        long long a = 0LL, b = 1LL, c = other.value, m = mod;
        while (c != 0LL) {
            long long t = m / c;
            m -= t * c;
            swap(c, m);
            a -= t * b;
            swap(a, b);
        }
        a %= mod;
        if (a < 0LL) a += mod;
        value = value * a % mod;
        return *this;
    }
    modular operator-() { return modular(-value); }
    modular operator+(modular rhs) { return modular(*this) += rhs; }
    modular operator-(modular rhs) { return modular(*this) -= rhs; }
    modular operator*(modular rhs) { return modular(*this) *= rhs; }
    modular operator/(modular rhs) { return modular(*this) /= rhs; }
    bool operator==(modular rhs) { return value == rhs.value; }
    bool operator!=(modular rhs) { return value != rhs.value; }
    bool operator<(modular rhs) { return value < rhs.value; }
};
template <long long mod>
string to_string(modular<mod> x) {
    return to_string(x.value);
}
template <long long mod>
ostream& operator<<(ostream& stream, modular<mod> x) {
    x.value %= mod;
    if (x.value < 0LL) x.value += mod;
    return stream << x.value;
}
template <long long mod>
istream& operator>>(istream& stream, modular<mod>& x) {
    stream >> x.value;
    x.value %= mod;
    if (x.value < 0LL) x.value += mod;
    return stream;
}
const long long mod = (long long)1e9 + 7;
using mint = modular<mod>;

inline mint pw(mint a, long long n) {
    mint res = 1;
    while (n > 0LL) {
        if (n & 1LL) {
            res *= a;
        }
        a *= a;
        n >>= 1;
    }
    return res;
}
vector<mint> fact, finv;
inline void cinit(int n) {
    fact.resize(n, mint(1LL));
    finv.resize(n, mint(1LL));
    for (int i = 2; i < n; i++) {
        fact[i] = fact[i - 1] * i;
    }
    finv[n - 1] /= fact[n - 1];
    for (int i = n - 2; i >= 2; i--) {
        finv[i] = finv[i + 1] * (i + 1);
    }
}
inline mint C(int n, int k) {
    if (n < k || k < 0 || n < 0) {
        return mint(0LL);
    }
    return fact[n] * finv[k] * finv[n - k];
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    vector<vector<int>> c(2, vector<int>(2));
    for (int i = 0; i < 2; i++) {
        for (int j = 0; j < 2; j++) {
            char x;
            cin >> x;
            c[i][j] = x - 'A';
        }
    }
    if (n <= 3) {
        cout << 1 << '\n';
        return 0;
    }
    if (c[0][1] == 1) {
        swap(c[0][0], c[1][1]);
        for (int i = 0; i < 2; i++) {
            for (int j = 0; j < 2; j++) {
                c[i][j] ^= 1;
            }
        }
    }
    if (c[0][0] == 0) {
        cout << 1 << '\n';
    } else if (c[1][0] == 0) {
        vector<vector<mint>> dp(2, vector<mint>(n));
        dp[0][0] = 1;
        for (int i = 1; i < n; i++) {
            dp[0][i] = dp[0][i - 1] + dp[1][i - 1];
            dp[1][i] = dp[0][i - 1];
        }
        cout << dp[1][n - 1] << '\n';
    } else {
        cout << pw(2, n - 3) << '\n';
    }
    return 0;
}


#include<cstdio>
#include<cstring>
using namespace std;
typedef long long ll;
ll mymin(ll x,ll y) {return x<y?x:y;}
int main()
{
	ll n;scanf("%lld",&n);
	ll Ans=n;
	for(int i=0;i<=62;i++){
		ll t=(1ll<<i);
		Ans=mymin(Ans,n/t+n%t+i);
	}
	printf("%lld\n",Ans);
	return 0;
}

#ifndef AUTO_UTIL_HEADER_HPP
#define AUTO_UTIL_HEADER_HPP

#include <bits/stdc++.h>
#include <cassert>

using std::cin, std::cout, std::bitset, std::complex;
using std::vector, std::array, std::string, std::pair, std::list, std::queue, std::deque;
using std::priority_queue, std::set, std::map, std::unordered_map;
using std::greater;

using vi = vector<int>; using vvi = vector<vi>; using vvvi = vector<vvi>;
using ull = unsigned long long int;
using ll = long long int;
using vll = vector<ll>; using vvll = vector<vll>; using vvvll = vector<vvll>;
using vd = vector<double>; using vvd = vector<vd>; using vvvd = vector<vvd>;
using P = pair<int, int>;
using Pll = pair<ll, ll>;
using cdouble = complex<double>;

const double eps = 1e-7;
#define Loop(i, n) for(int i = 0; i < int(n); i++)
#define Loopll(i, n) for(ll i = 0; i < ll(n); i++)
#define Loop1(i, n) for(int i = 1; i <= int(n); i++)
#define Loopll1(i, n) for(ll i = 1; i <= ll(n); i++)
#define Loopr(i, n) for(int i = int(n) - 1; i >= 0; i--)
#define Looprll(i, n) for(ll i = ll(n) - 1; i >= 0; i--)
#define Loopr1(i, n) for(int i = int(n); i >= 1; i--)
#define Looprll1(i, n) for(ll i = ll(n); i >= 1; i--)
#define Foreach(buf, container) for(const auto &buf : container)
#define Foreachr(buf, container)  for(const auto &buf : reversed(container))
#define Loopdiag(i, j, h, w, sum) for(int i = ((sum) >= (h) ? (h) - 1 : (sum)), j = (sum) - i; i >= 0 && j < (w); i--, j++)
#define Loopdiagr(i, j, h, w, sum) for(int j = ((sum) >= (w) ? (w) - 1 : (sum)), i = (sum) - j; j >= 0 && i < (h); j--, i++)
#define Loopdiagsym(i, j, h, w, gap) for (int i = ((gap) >= 0 ? (gap) : 0), j = i - (gap); i < (h) && j < (w); i++, j++)
#define Loopdiagsymr(i, j, h, w, gap) for (int i = ((gap) > (h) - (w) - 1 ? (h) - 1 : (w) - 1 + (gap)), j = i - (gap); i >= 0 && j >= 0; i--, j--)
#define Loopitr(itr, container) for(auto itr = container.begin(); itr != container.end(); itr++)
#define quickio() std::ios::sync_with_stdio(false); std::cin.tie(0);
#define bitmanip(m,val) static_cast<bitset<(int)m>>(val)
#define Comp(type_t) bool operator<(const type_t &another) const
#define fst first
#define snd second
bool feq(double x, double y) { return abs(x - y) <= eps; }
bool inrange(ll x, ll t) { return x >= 0 && x < t; }
bool inrange(vll xs, ll t) { Foreach(x, xs) if (!(x >= 0 && x < t)) return false; return true; }
int ceillog2(ll x) { int m = int(log2(x)); return m + ((1LL << m) < x ? 1 : 0); }
int floorlog2(ll x) { int m = int(log2(x)); return m - ((1LL << m) > x ? 1 : 0); }
const string endl = "\n";
template<class T> T reversed(T container) { reverse(container.begin(), container.end()); return container; }
template<class T> void printv(const vector<T> &v) { for (const T &x : v) cout << x << " "; cout << endl; }
template<class T> void printmx(const vector<vector<T>> &mx) { for (const vector<T> &v : mx) printv(v); }
template<class T> void chmin(T &x, const T &y) { x = std::min(x, y); }
template<class T> void chmax(T &x, const T &y) { x = std::max(x, y); }
ll rndf(double x) { return (ll)(x + (x >= 0 ? 0.5 : -0.5)); }
ll floorsqrt(ll x) { ll m = (ll)sqrt((double)x); return m + (m*  m <= x ? 0 : -1); }
ll ceilsqrt(ll x) { ll m = (ll)sqrt((double)x); return m + (x <= m * m ? 0 : 1); }
ll rnddiv(ll a, ll b) { return (a / b + (a % b * 2 >= b ? 1 : 0)); }
ll ceildiv(ll a, ll b) { return (a / b + (a % b == 0 ? 0 : 1)); }
ll gcd(ll m, ll n) { if (n == 0) return m; else return gcd(n, m % n); }
ll lcm(ll m, ll n) { return ll(m) * ll(n) / gcd(m, n); }

#endif // AUTO_UTIL_HEADER_HPP

//========================================================================//

int main() {
    ll n; cin >> n;
    ll ans = LLONG_MAX;
    Loopll(b, 62) {
        ll a = n >> b;
        ll c = n % (1LL << b);
        chmin(ans, a + b + c);
    }
    cout << ans << endl;
}


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

template<typename T>
void view_1d(vector<T> V, string sep) {
    for (ll i=0; i<V.size(); i++) {
        cout << V[i];
        if (i == V.size() - 1) {
            cout << endl;
        } else {
            cout << sep;
        }
    }
}

template<typename T>
void view_2d(vector<vector<T>> V, string sep) {
    for (ll i=0; i<V.size(); i++) {
        for (ll j=0; j<V[i].size(); j++) {
            cout << V[i][j];
            if (j == V[i].size() - 1) {
                cout << endl;
            } else {
                cout << sep;
            }
        }
    }
}

//==============================//

int main() {
    ll N, P;
    cin >> N >> P;

    ll BASE = 1000000007;
    ll n = N - 1;
    ll x = P - 2;
    ll ans = P - 1;
    while (n > 0) {
        if (n & 1) ans = ans * x % BASE;
        x = x * x % BASE;
        n >>= 1;
    }
    cout << ans << endl;
}

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

int main() {

  int A;
  int B;
  cin >> A >> B;

  A >= 0;
  B <= 2 * A + 100;
  B <= 1000;

  cout << 2 * A + 100 - B << endl;

}


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

#ifdef LOCAL
#define DEBUG(...) debug(#__VA_ARGS__, __VA_ARGS__);
#else
#define DEBUG(...) 6;
#endif

template<typename T, typename S> ostream& operator << (ostream &os, const pair<T, S> &p) {return os << "(" << p.first << ", " << p.second << ")";}
template<typename C, typename T = decay<decltype(*begin(declval<C>()))>, typename enable_if<!is_same<C, string>::value>::type* = nullptr>
ostream& operator << (ostream &os, const C &c) {bool f = true; os << "["; for (const auto &x : c) {if (!f) os << ", "; f = false; os << x;} return os << "]";}
template<typename T> void debug(string s, T x) {cerr << s << " = " << x << "\n";}
template<typename T, typename... Args> void debug(string s, T x, Args... args) {cerr << s.substr(0, s.find(',')) << " = " << x << " | "; debug(s.substr(s.find(',') + 2), args...);}

const int MAX = 4e5 + 5;

int vis[MAX];
vector<pair<int, int>> adj[MAX];

bool dfs(int u, int p) {
    bool ret = true;
    vis[u] = true;
    for (auto [v, i] : adj[u]) {
        if (!vis[v])
            ret &= dfs(v, i);
        else if (i != p)
            ret = false;
    }
    return ret;
}

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

    int n;
    cin >> n;
    for (int i=0; i<n; i++) {
        int a, b;
        cin >> a >> b;
        adj[a].emplace_back(b, i);
        adj[b].emplace_back(a, i);
    }

    int ret = MAX - 1;
    for (int i=1; i<MAX; i++)
        if (!vis[i] && dfs(i, -1))
            ret--;
    cout << ret << "\n";

    return 0;
}

#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(w, 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<int, int> P;
typedef priority_queue<int> PQ;
typedef priority_queue<int, vector<int>, greater<int>> PQG;
typedef priority_queue<P> PQP;
typedef priority_queue<P, vector<P>, greater<P>> PQPG;

const int MAX_N = 1e3, MOD = 1e9 + 7, INF = 1e9;
int n, m;
bool used[MAX_N * MAX_N];
map<char, vector<int>> to[MAX_N];

int main() {
    ci2(n, m);
    rep(i, m) {
        int a, b;
        char c;
        ci3(a, b, c);
        to[a - 1][c].epb(b - 1);
        to[b - 1][c].epb(a - 1);
    }

    queue<P> q;
    q.ep(0, n - 1);
    used[n - 1] = true;
    int ans = INF, dist = 0;
    while (!q.empty()) {
        P p = q.front(); q.pop();
        if (p.fi > dist && ans < INF) {
            co(ans);
            return 0;
        }
        dist = p.fi;
        int l = p.se / n, r = p.se % n;
        for (auto &i: to[l]) {
            if (to[r].find(i.fi) == to[r].end()) continue;
            for (auto &j: to[l][i.fi]) {
                for (auto &k: to[r][i.fi]) {
                    if (j == r && k == l) ans = min(ans, 2 * p.fi + 1);
                    if (j == k) ans = min(ans, 2 * p.fi + 2);
                    int tmp = j * n + k;
                    if (!used[tmp]) {
                        q.ep(p.fi + 1, tmp);
                        used[tmp] = true;
                    }
                }
            }
        }
    }
    co(-1);
    return 0;
}


#include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<(n); i++)
#define reps(i,s,n) for(int i=(s); i<(n); i++)
#define all(v) v.begin(),v.end()
#define outve(v) for(auto i : v) cout << i << " ";cout << endl
#define outmat(v) for(auto i : v){for(auto j : i) cout << j << " ";cout << endl;}
#define in(n,v) for(int i=0; i<(n); i++){cin >> v[i];}
#define out(n) cout << (n) << endl
#define fi first
#define se second
#define pb push_back
#define si(v) int(v.size())
#define len(v) int(v.length())
#define lob(v,n) lower_bound(all(v),n)
#define lobi(v,n) lower_bound(all(v),n) - v.begin()
#define upb(v,n) upper_bound(all(v),n)
#define upbi(v,n) upper_bound(all(v),n) - v.begin()
#define mod 1000000007
#define infi 1010000000
#define infl 1100000000000000000
#define cyes cout << "Yes" << endl
#define cno cout << "No" << endl
#define csp << " " <<
#define outset(n) cout << fixed << setprecision(n);
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vd = vector<double>;
using vvd = vector<vector<double>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
template<typename T> using ve = vector<T>;
template<typename T> using pq2 = priority_queue<T>;
template<typename T> using pq1 = priority_queue<T,vector<T>,greater<T>>;
template<typename T> bool chmax(T &a, T b) {if(a < b) {a = b;return 1;}return 0;}
template<typename T> bool chmin(T &a, T b) {if(a > b) {a = b;return 1;}return 0;}

char ff(char s, char t){
    if(s == t) return t;
    if(s != 'R' && t != 'R') return 'R';
    else if(s != 'B' && t != 'B') return 'B';
    else return 'W';
}

string g(string s){
    //cout << 1 csp si(s) csp s << endl;

    if(si(s) == 1) return s;

    int a = 1;
    int aa = a;
    while (a <= si(s)) {
        if((si(s)-1) % a == 0) chmax(aa,a);
        a *= 3;
    }

    string t = "";
    int b = 0;
    while (b+aa < si(s)) {
        t += ff(s[b],s[b+aa]);
        //cout << s[b] csp b csp s[b+aa] csp b+aa << " ";
        b += aa;
    }
    //cout << endl;
    if(si(t) == 1) return t;
    else return g(t);
}

int main(){

    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int N;
    cin >> N;
    string s;
    cin >> s;

    cout << g(s) << endl;

    return 0;
}

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

const int mod = 1e9 + 7;

class Mint {
private:
	int val;

public:
	Mint () {val = 0;}

	Mint(int _val) : val(_val) {}

	Mint& operator += (const Mint &o) {val = (val + o.val < mod ? val + o.val : val + o.val - mod); return *this;}
	template <typename T> Mint& operator += (const T &o) {return *this += Mint(o);}

	Mint& operator -= (const Mint &o) {val = (val < o.val ? val - o.val + mod : val - o.val); return *this;}
	template <typename T> Mint& operator -= (const T &o) {return *this -= Mint(o);}

	Mint& operator *= (const Mint &o) {return *this = (1LL * val * o.val >= mod ? (1LL * val * o.val) % mod : val * o.val);}
	template <typename T> Mint& operator *= (const T &o) {return *this *= Mint(o);}

	friend bool operator == (const Mint &o1, const Mint &o2) {return (o1.val == o2.val);}
	template <typename T> friend bool operator == (const Mint &o1, const T &o2) {return (o1 == Mint(o2));}
	template <typename T> friend bool operator == (const T &o1, const Mint &o2) {return (Mint(o1) == o2);}

	friend bool operator != (const Mint &o1, const Mint &o2) {return (o1.val != o2.val);}
	template <typename T> friend bool operator != (const Mint &o1, const T &o2) {return (o1 != Mint(o2));}
	template <typename T> friend bool operator != (const T &o1, const Mint &o2) {return (Mint(o1) != o2);}

	friend Mint operator + (const Mint &o1, const Mint &o2) {return Mint(o1) += o2;}
	template <typename T> friend Mint operator + (const Mint &o1, const T &o2) {return Mint(o1) += o2;}
	template <typename T> friend Mint operator + (const T &o1, const Mint &o2) {return Mint(o1) += o2;}

	friend Mint operator - (const Mint &o1, const Mint &o2) {return Mint(o1) -= o2;}
	template <typename T> friend Mint operator - (const Mint &o1, const T &o2) {return Mint(o1) -= o2;}
	template <typename T> friend Mint operator - (const T &o1, const Mint &o2) {return Mint(o1) -= o2;}

	friend Mint operator * (const Mint &o1, const Mint &o2) {return Mint(o1) *= o2;}
	template <typename T> friend Mint operator * (const Mint &o1, const T &o2) {return Mint(o1) *= o2;}
	template <typename T> friend Mint operator * (const T &o1, const Mint &o2) {return Mint(o1) *= o2;}

	Mint power(long long y) {
		Mint ans = 1;
		Mint x = *this;

		while(y > 0) {
			if(y & 1) ans *= x;
			y >>= 1;
			x *= x;
		}
		return ans;
	}

	Mint inverse () {return power(mod - 2);}

	Mint& operator /= (const Mint &o) {return *this *= Mint(o).inverse();}
	template <typename T> Mint& operator /= (const T &o) {return *this *= Mint(o).inverse();}

	friend Mint operator / (const Mint &o1, const Mint &o2) {return Mint(o1) /= o2;}
	template <typename T> friend Mint operator / (const Mint &o1, const T &o2) {return Mint(o1) /= o2;}
	template <typename T> friend Mint operator / (const T &o1, const Mint &o2) {return Mint(o1) /= o2;}

	bool operator ~ () const {return ~(this -> val);}
	bool operator ! () const {return (this -> val == 0);}
	void operator ++ () {*this += 1;}
	void operator -- () {*this -= 1;}
	void operator ++ (int) {*this += 1;}
	void operator -- (int) {*this -= 1;}

	friend ostream &operator << (ostream &os, const Mint &o) {os << o.val; return os;}
};

const int maxN = 3005;
Mint dp[maxN][maxN], mp[maxN][maxN];

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

	ll a[n];
	for(int i = 0; i < n; i++) {
		cin >> a[i];
	}

	mp[0][0] = 1;

	ll sum = 0;
	for(int i = 1; i <= n; i++) {
		sum += a[i - 1];
		for(int j = i; j > 0; j--) {
			dp[i][j] = mp[j - 1][sum % j];
			mp[j][sum % (j + 1)] += dp[i][j];
		}
	}

	Mint ans = 0;
	for(int i = 1; i <= n; i++) {
		ans += dp[n][i];
	}
	cout << ans;
}


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

int main(){
    int n; cin >> n;
    vector<pair<int,int>> x;
    vector<pair<int,int>> y;
    for(int i = 0; i < n; i++){
        int xi, yi;
        cin >> xi >> yi;
        x.push_back(make_pair(xi,i));
        y.push_back(make_pair(yi,i));
    }
    sort(x.begin(),x.end());
    sort(y.begin(),y.end());
    vector<tuple<int,int,int>> l;
    l.push_back(make_tuple(x[n-1].first-x[0].first,x[0].second,x[n-1].second));
    l.push_back(make_tuple(x[n-1].first-x[1].first,x[1].second,x[n-1].second));
    l.push_back(make_tuple(x[n-2].first-x[0].first,x[0].second,x[n-2].second));
    l.push_back(make_tuple(y[n-1].first-y[0].first,y[0].second,y[n-1].second));
    l.push_back(make_tuple(y[n-1].first-y[1].first,y[1].second,y[n-1].second));
    l.push_back(make_tuple(y[n-2].first-y[0].first,y[0].second,y[n-2].second));
    sort(l.begin(),l.end());
    reverse(l.begin(),l.end());
    int lmax_a, lmax_b;
    tie(ignore,lmax_a,lmax_b) = l[0];
    int ans;
    for(auto li : l){
        int il, ia, ib;
        tie(il,ia,ib) = li;
        if(!((lmax_a == ia && lmax_b == ib)||(lmax_a == ib && lmax_b == ia))){
            ans = il;
            break;
        }
    }
    cout << ans << endl;
}

#include<iostream>
#include<vector>
#include<algorithm>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<string.h>
#include<math.h>
#define ll long long
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define pb push_back
#define F first
#define S second
#define MAX 500005
#define MOD (ll)(1e9+7)
#define INF (ll)(1e18)
#define AC ios::sync_with_stdio(0);cin.tie(0);
using namespace std;
signed main(){
    AC;
    int n;
    cin>>n;
    vector<pair<ll,int> > x;
    vector<pair<ll,int> > y;
    FOR(i,0,n){
        ll a,b;
        cin>>a>>b;
        x.pb({a,i});
        y.pb({b,i});
    }
    sort(x.begin(),x.end());
    sort(y.begin(),y.end());
    vector<pair<ll,pair<int,int> > > aa;
    aa.clear();
    map<pair<int,int> ,bool> used;
    aa.pb({abs(x[0].F-x[n-1].F),{x[n-1].S,x[0].S}});
          aa.pb({abs(x[0].F-x[n-2].F),{x[n-2].S,x[0].S}});
                aa.pb({abs(x[1].F-x[n-1].F),{x[n-1].S,x[1].S}});
    aa.pb({abs(y[0].F-y[n-1].F),{y[n-1].S,y[0].S}});
          aa.pb({abs(y[0].F-y[n-2].F),{y[n-2].S,y[0].S}});
                aa.pb({abs(y[1].F-y[n-1].F),{y[n-1].S,y[1].S}});
    sort(aa.begin(),aa.end());
    if(aa[5].S.F==aa[4].S.F&&aa[5].S.S==aa[4].S.S){
        cout<<aa[3].F<<endl;
    }
    else if(aa[5].S.F==aa[4].S.S&&aa[5].S.S==aa[4].S.F){
        cout<<aa[3].F<<endl;
    }
    else{
        cout<<aa[4].F<<endl;
    }
}


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

int get() {
	int x = 0, f = 1; char c = getchar();
	while(!isdigit(c)) { if(c == '-') f = -1; c = getchar(); }
	while(isdigit(c)) { x = x * 10 + c - '0'; c = getchar(); }
	return x * f;
}

const int N = 2e5 + 5;
int n, m, q, a[N], b[N], ans, len, bin[N], tot;
struct Ask {
	int T, x, y;
} s[N];

struct BIT {
	int sum[N], sum0;
	int lowbit(int x) { return x & (-x); }
	void add(int x, int v) { while(x <= tot) sum[x] += v, x += lowbit(x); }
	int ask(int x) { int r(0); while(x) r += sum[x], x -= lowbit(x); return r + sum0; }
	int ask(int l, int r) { if(l > r) return 0; return ask(r) - ask(l - 1); }
} A1, B1, AS, BS;

void add1(int x) {
	ans += BS.ask(a[x] + 1, tot) + bin[a[x]] * B1.ask(1, a[x]);
	A1.add(a[x], 1), AS.add(a[x], bin[a[x]]);
}

void del1(int x) {
	ans -= BS.ask(a[x] + 1, tot) + bin[a[x]] * B1.ask(1, a[x]);
	A1.add(a[x], -1), AS.add(a[x], -bin[a[x]]);
}

void add2(int x) {
	ans += AS.ask(b[x], tot) + bin[b[x]] * A1.ask(1, b[x] - 1);
	B1.add(b[x], 1), BS.add(b[x], bin[b[x]]);
}

void del2(int x) {
	ans -= AS.ask(b[x], tot) + bin[b[x]] * A1.ask(1, b[x] - 1);
	B1.add(b[x], -1), BS.add(b[x], -bin[b[x]]);
}

signed main() {
	n = get(), m = get(), q = get();
	for(int i = 1; i <= q; i++) s[i].T = get(), s[i].x = get(), s[i].y = get(), bin[i] = s[i].y;
	bin[q + 1] = 0;
	sort(bin + 1, bin + 1 + q + 1), tot = unique(bin + 1, bin + 1 + q + 1) - bin - 1;
	for(int i = 1; i <= q; i++) s[i].y = lower_bound(bin + 1, bin + 1 + tot, s[i].y) - bin;
	for(int i = 1; i <= n; i++) a[i] = 1;
	for(int i = 1; i <= m; i++) b[i] = 1;
	A1.add(1, n), B1.add(1, m);
	for(int i = 1; i <= q; i++) {
		int T = s[i].T, x = s[i].x, y = s[i].y;
		if(T == 1) del1(x), a[x] = y, add1(x);
		else del2(x), b[x] = y, add2(x);
		printf("%lld\n", ans);
	}
	return 0;
}

#include <bits/stdc++.h>
//#include<boost/multiprecision/cpp_int.hpp>
//#include <atcoder/all>
#define rep(i, a) for (int i = (int)0; i < (int)a; ++i)
#define rrep(i, a) for (int i = (int)a - 1; i >= 0; --i)
#define REP(i, a, b) for (int i = (int)a; i < (int)b; ++i)
#define RREP(i, a, b) for (int i = (int)a - 1; i >= b; --i)
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define popcount __builtin_popcount
using ll = long long;
constexpr ll mod = 1e9 + 7;
constexpr ll INF = 1LL << 60;

// #pragma GCC target("avx2")
// #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")

//using lll=boost::multiprecision::cpp_int;
template <class T>
inline bool chmin(T &a, T b)
{
	if (a > b)
	{
		a = b;
		return true;
	}
	return false;
}
template <class T>
inline bool chmax(T &a, T b)
{
	if (a < b)
	{
		a = b;
		return true;
	}
	return false;
}

template <typename T>
T mypow(T x, T n, const T &p = -1)
{ //x^nをmodで割った余り
	T ret = 1;
	while (n > 0)
	{
		if (n & 1)
		{
			if (p != -1)
				ret = (ret * x) % p;
			else
				ret *= x;
		}
		if (p != -1)
			x = (x * x) % p;
		else
			x *= x;
		n >>= 1;
	}
	return ret;
}

using namespace std;
// using namespace atcoder;

template<int mod>
struct Modint{
    int x;
    Modint():x(0){}
    Modint(int64_t y):x((y%mod+mod)%mod){}

    Modint &operator+=(const Modint &p){
			if((x+=p.x)>=mod)
				x -= mod;
			return *this;
		}

		Modint &operator-=(const Modint &p){
			if((x+=mod-p.x)>=mod)
				x -= mod;
			return *this;
		}

		Modint &operator*=(const Modint &p){
			x = (1LL * x * p.x) % mod;
			return *this;
		}

		Modint &operator/=(const Modint &p){
			*this *= p.inverse();
			return *this;
		}

		Modint operator-() const { return Modint(-x); }
		Modint operator+(const Modint &p) const{
			return Modint(*this) += p;
		}
		Modint operator-(const Modint &p) const{
			return Modint(*this) -= p;
		}
		Modint operator*(const Modint &p) const{
			return Modint(*this) *= p;
		}
		Modint operator/(const Modint &p) const{
			return Modint(*this) /= p;
		}

		bool operator==(const Modint &p) const { return x == p.x; }
		bool operator!=(const Modint &p) const{return x != p.x;}

		Modint inverse() const{//非再帰拡張ユークリッド
			int a = x, b = mod, u = 1, v = 0;
			while(b>0){
				int t = a / b;
				swap(a -= t * b, b);
				swap(u -= t * v, v);
			}
			return Modint(u);
		}

		Modint pow(int64_t n) const{//繰り返し二乗法
			Modint ret(1), mul(x);
			while(n>0){
				if(n&1)
					ret *= mul;
				mul *= mul;
				n >>= 1;
			}
			return ret;
		}

		friend ostream &operator<<(ostream &os,const Modint &p){
			return os << p.x;
		}
};

using modint = Modint<mod>;

void solve()
{
	double a,b;
	cin>>a>>b;
	double x=a-b;
	double ans=x/a*100;
	cout<<ans;
}

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


#include <iostream>
#include <algorithm>
#include <unordered_set>
#include <set>
#include <vector>
#include <queue>
#include <map>
#include <numeric>
#include <math.h>
#include <complex>

using namespace std;

#define rep(i, n) for (long long int i = 0; i < (long long int)(n); i++)
#define irep(i, n) for (long long int i = 1; i <= (long long int)(n); i++)
#define drep(i, n, diff) for (long long int i = 0; i < (long long int)(n); i += diff)
#define mod 1000000007
#define INF 100100100100100101
#define ld(val) printf("%s : %lld\n", #val, val);
#define sd(val) printf("%s : %s\n", #val, val);

typedef long long int ll;
typedef pair<ll, ll> P;
typedef pair<P, P> PP;
typedef tuple<ll, ll, ll> TP;

int main() {
  ll n, k;
  cin >> n >> k;
  rep(i, k) {
    if(n%200==0){
      n/=200;
    }else{
      n*=1000;
      n+=200;
    }
  }
  cout << n << endl;
  return 0;
}

#include<bits/stdc++.h>
#define ll long long
#define mp make_pair
#define f(i,n) for(int i=0;i<n;i++)
#define F first
#define S second
#define pb push_back

using namespace std;

pair<int,int> fun(int a, int b){
	return {min(a,b),max(a,b)};
}

bool comp(pair<pair<ll,ll> ,int > a ,pair<pair<ll,ll> ,int > b ){
	return a.F.F<b.F.F;
}

bool comp2(pair<pair<ll,ll> ,int > a ,pair<pair<ll,ll> ,int > b ){
	return a.F.S<b.F.S;
}

void test(){
	ll n;
	cin>>n;
	ll x[n],y[n];
	f(i,n)cin>>x[i]>>y[i];

	vector<pair<pair<ll,ll>,int> > v;

	f(i,n)v.pb({{x[i],y[i]},i});

	sort(v.begin(),v.end(),comp);

	set<pair<int,int> > st;

	st.insert(fun(v[0].S,v[n-1].S));
	st.insert(fun(v[0].S,v[n-2].S));
	st.insert(fun(v[1].S,v[n-1].S));

	sort(v.begin(),v.end(),comp2);

	st.insert(fun(v[0].S,v[n-1].S));
	st.insert(fun(v[0].S,v[n-2].S));
	st.insert(fun(v[1].S,v[n-1].S));

	vector<ll> dis;

	for(auto z : st){
		dis.pb(max(abs(x[z.F]-x[z.S]), abs(y[z.F]-y[z.S])));
	}

	sort(dis.rbegin(),dis.rend());

	cout<<dis[1]<<"\n";

}

int main(){
	std::ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int tests=1;
	// cin>>tests;
	while(tests--){
		test();
	}
}


#include<iostream>
#include<iomanip>
#include<string>
#include<vector>
#include<algorithm>
#include<utility>
#include<tuple>
#include<map>
#include<queue>
#include<deque>
#include<set>
#include<stack>
#include<numeric>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>

using namespace std;

using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

#define BIL ((ll)1e9)
#define MOD ((ll)1e9+7)
#define INF (1LL<<60)           //1LL<<63でオーバーフロー
#define inf (1<<29)             //1<<29でオーバーフロー

int main(int argc,char* argv[]){
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout << fixed << setprecision(20);

    int a,b;
    cin >> a >> b;
    cout << 2*a+100-b << endl;

    return 0;
}

#include <iostream>
#include <cmath>
#include <utility>

using namespace std;

typedef pair<int,int> pii;
typedef long long ll;
#define mp make_pair
#define x first
#define y second

int main () {
	int a,b;
	cin>>a>>b;
	cout<<(a+b)/2<<" ";
	cout<<(a-b)/2;

return 0;
}


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

using namespace std;

using ll = long long;

int h, w, n, m, vis[1510][1510];
struct pos{
    int x, y;
};
pos p[500005];
const int dx[] = {1, 0, -1, 0};
const int dy[] = {0, 1, 0, -1};

void dfs(int x, int y, int k) {
    if (x < 0 || y < 0 || x >= h || y >= w) return;
    if (vis[x][y] == 1 || vis[x][y] == -1) return;
    if (vis[x][y] == 0) vis[x][y] = 2;
    dfs(x + dx[k], y + dy[k], k);
}

int main() {
    scanf("%d %d %d %d\n", &h, &w, &n, &m);
    for (int i = 0; i < n; i++) {
        int x, y;
        scanf("%d %d", &x, &y);
        p[i].x = x - 1, p[i].y = y - 1;
        vis[x - 1][y - 1] = 1;
    }
    for (int i = 0; i < m; i++) {
        int x, y;
        scanf("%d %d", &x, &y);
        vis[x - 1][y - 1] = -1;
    }
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < 4; j++)
            dfs(p[i].x + dx[j], p[i].y + dy[j], j);
    }
    int ans = 0;
    for (int i = 0; i < h; i++) {
        for (int j = 0; j < w; j++) {
            if (vis[i][j] > 0) ans++;
        }
    }
    printf("%d", ans);
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

typedef long long          ll;
typedef unsigned long long ull;
typedef vector<int>         vi;
typedef vector<bool>       vb;
typedef map<int, int>      mii;
typedef pair<int, int>     ii;

#define INF                0x3f3f3f3f
#define INFLL              0x3f3f3f3f3f3f3f3f
#define each(x, s)         for(auto& x : s)
#define loop(x)            for(int i = 0;i < x;i++)
#define vloop(v, x)        for(int v = 0;v < x;v++)
#define avg(l, r)          l + (r - l) / 2
#define iter(a)            a.begin(), a.end()
#define riter(a)           a.rbegin(), a.rend()
#define endl               "\n"

const ll mod = 1000000007;

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

  int h, w, n, m;
  cin >> h >> w >> n >> m;
  vector<vb> grid(h, vb(w, true));
  int ans = h * w, x, y;
  vector<vi> lvs(w, vi(1, -2)), bvs(w, vi(1, -1)), lhs(h, vi(1, -2)), bhs(h, vi(1, -1));
  loop(n) {
    cin >> x >> y;
    x--, y--;
    grid[x][y] = false;
    lhs[x].push_back(y);
    lvs[y].push_back(x);
  }
  loop(m) {
    cin >> x >> y;
    x--, y--;
    grid[x][y] = false;
    bhs[x].push_back(y);
    bvs[y].push_back(x);
    ans--;
  }
  loop(h) {
    lhs[i].push_back(INF + 1);
    bhs[i].push_back(INF);
    sort(iter(lhs[i]));
    sort(iter(bhs[i]));
  }
  loop(w) {
    lvs[i].push_back(INF + 1);
    bvs[i].push_back(INF);
    sort(iter(lvs[i]));
    sort(iter(bvs[i]));
  }
  vi vls(w, 0), vbs(w, 0);
  loop(h) {
    int hl = 0, hb = 0;
    vloop(j, w) {
      if (lhs[i][hl + 1] == j) {
        hl++;
        vls[j]++;
      }
      else if (bhs[i][hb + 1] == j) {
        hb++;
        vbs[j]++;
      }
      if (!grid[i][j]) continue;
      if (lhs[i][hl] < bhs[i][hb] and lhs[i][hl + 1] > bhs[i][hb + 1] and lvs[j][vls[j]] < bvs[j][vbs[j]] and lvs[j][vls[j] + 1] > bvs[j][vbs[j] + 1]) {
        ans -= grid[i][j];
        grid[i][j] = false;
      }
    }
  }
  cout << ans << endl;
  return 0;
}


#include <bits/stdc++.h>
using namespace std;
// #define LOCAL // 提出時はコメントアウト
#define DEBUG_

typedef long long ll;
const double EPS = 1e-9;
const ll INF = ((1LL<<62)-(1LL<<31));
typedef vector<ll> vecl;
typedef pair<ll, ll> pairl;
template<typename T> using uset = unordered_set<T>;
template<typename T, typename U> using mapv = map<T,vector<U>>;
template<typename T, typename U> using umap = unordered_map<T,U>;

#define ALL(v) v.begin(), v.end()
#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define sz(x) (ll)x.size()
ll llceil(ll a,ll b) { return (a+b-1)/b; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> vector<vector<T>> genarr(ll n, ll m, T init) { return vector<vector<T>>(n,vector<T>(m,init)); }

///// DEBUG
#define DUMPOUT cerr
#define repi(itr, ds) for (auto itr = ds.begin(); itr != ds.end(); itr++)
template<typename T>istream&operator>>(istream&is,vector<T>&vec){for(T&x:vec)is>>x;return is;}
template<typename T,typename U>ostream&operator<<(ostream&os,pair<T,U>&pair_var){os<<"("<<pair_var.first<<", "<<pair_var.second<<")";return os;}
template<typename T>ostream&operator<<(ostream&os,const vector<T>&vec){os<<"{";for(int i=0;i<vec.size();i++){os<<vec[i]<<(i+1==vec.size()?"":", ");}
os<<"}";return os;}
template<typename T,typename U>ostream&operator<<(ostream&os,map<T,U>&map_var){os<<"{";repi(itr,map_var){os<<*itr;itr++;if(itr!=map_var.end())os<<", ";itr--;}
os<<"}";return os;}
template<typename T>ostream&operator<<(ostream&os,set<T>&set_var){os<<"{";repi(itr,set_var){os<<*itr;itr++;if(itr!=set_var.end())os<<", ";itr--;}
os<<"}";return os;}
void dump_func(){DUMPOUT<<endl;}
template<class Head,class...Tail>void dump_func(Head&&head,Tail&&...tail){DUMPOUT<<head;if(sizeof...(Tail)>0){DUMPOUT<<", ";}
dump_func(std::move(tail)...);}
#ifndef LOCAL
#undef DEBUG_
#endif
#ifdef DEBUG_
#define DEB
#define dump(...)                                                          \
DUMPOUT << "  " << string(#__VA_ARGS__) << ": "                            \
        << "[" << to_string(__LINE__) << ":" << __FUNCTION__ << "]"        \
        << endl                                                            \
        << "    ",                                                         \
    dump_func(__VA_ARGS__)
#else
#define DEB if (false)
#define dump(...)
#endif

//////////

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")

int solve(ostringstream &cout) {
    #ifdef LOCAL
    ifstream in("../../Atcoder/input.txt");
    cin.rdbuf(in.rdbuf());
    #endif

    ll N;
    cin>>N;

    vecl A(N),B(N);
    rep(i,N) {
        cin>>A[i]>>B[i];
    }

    rep(i,N) {
        REP(j,i+1,N) {
            REP(k,j+1,N) {
                ll x = A[j] - A[i], y = B[j] - B[i];
                ll X = A[k] - A[i], Y = B[k] - B[i];

                if (x * Y == y * X) {
                    cout << "Yes" << endl;
                    return 0;
                }
            }
        }
    }

    cout << "No" << endl;

    return 0;
}

int main() {
    ostringstream oss;
    int res = solve(oss);

    cout << oss.str();
    return res;
}

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

#define mod 1000000007

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin>>n;
  ll arr[n][3];
  for(int i=0;i<n;i++){
    cin>>arr[i][0]>>arr[i][1]>>arr[i][2];
  }
  ll ans=INT_MAX;
  for(int i=0;i<n;i++){
    ll dif=arr[i][2]-arr[i][0];
    if(dif>0){
      ans=min(ans,arr[i][1]);
    }
  }
  if(ans==INT_MAX){
    cout<<-1;
  }
  else{
    cout<<ans;
  }
  return 0;
}


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

void solve() {

}

int main() {
  // input
  int N;
  cin >> N;
  vector<int> A(N, 0);
  rep(i, N) cin >> A[i];

  sort(A.begin(), A.end());

  int k = 0;
  int ans = 0;
  for (int i = 2; i <= A[N - 1]; i++)
  {
    int gcd = 0;
    for (int a : A)
    {
      if (a % i == 0) {
        gcd++;
      }
    }
    if (k <= gcd) {
      k = gcd;
      ans = i;
    }
  }

  cout << ans << endl;
}

#include<iostream>
#include<vector>
#include<string>
#include<cmath>
using namespace std;
typedef long long ll;
ll mod(ll a);

int main(){
  int n;
  cin >> n;
  vector<int> p(n);
  vector<int> a(200000,0);
  for(int i=0;i<n;++i) cin >> p[i];
  int min=0;
  for(int i=0;i<n;++i){
    a[p[i]]++;
    //cout<<"input "<<p[i]<<" "<<min<<endl;
    if(min==p[i]){
      int k=p[i];
      while(a[k]!=0) k++;
      min = k;
    }
    cout<<min<<endl;
  }

}

ll mod(ll a){
  int b=1000000007;
  while(a<0) a+=b;
  return a%b;
}


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

ll gcdE(ll a,ll b,ll *x, ll *y){
	if(a == 0){
		*x = 0, *y = 1;
		return b;
	}
	ll x1,y1;
	ll gcd = gcdE(b%a,a,&x1,&y1);
	*x = y1-(b/a)*x1;
	*y = x1;
	return gcd;
}
ll modInverse(ll b,ll m){
	ll x,y;
	ll g = gcdE(b,m,&x,&y);
	if(g != 1) return -1;
	return (x%mod+mod)%mod;
}
ll modDivide(ll a,ll b){
	a = a%mod;
	ll inv = modInverse(b,mod);
	if(inv == -1) return -1;
	return (inv*a)%mod;
}
ll binomialCoeff(int n,int k){
	ll res = 1;
	if(k > n-k) k = n-k;
	for(int i = 0; i < k; i++){
		res = mul(res,n-i);
		res = modDivide(res,i+1);
	}
	return res;
}

int main(){
	ios_base::sync_with_stdio(0); cin.tie(0);
	int N,M; cin >> N >> M;
	vi A(N);
	int sum = 0;
	forn(i,0,N){
		cin >> A[i];
		sum += A[i];
	}
	if(sum > M){
		cout << 0 << '\n';
		return 0;
	}
	ll res = binomialCoeff(M+N,sum+N);
	if(res < 0)res += mod;
	cout << res << '\n';
	return 0;
}
/*
__builtin_mul_overflow(x,y,&x)
-fsplit-stack
*/

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

// #include <atcoder/all>
// using namespace atcoder;
// using mint = modint1000000007;
// using mint2 = modint998244353;

typedef int64_t Int;
#define all(x) (x).begin(), (x).end()

const double EPS = 1e-10;
const Int INF = 5e18;
const int inf = 1e9;
const Int mod = 1e9+7;
//const Int mod = 998244353;

typedef struct {
    int64_t to, weight;
} edge;

Int dx[] = {0, 1, 0, -1, -1, 1, -1, 1};
Int dy[] = {1, 0, -1, 0, -1, -1, 1, 1};

template<class T>
istream &operator>>(istream &is, vector<T> &v) {
    for (auto &e : v) {
        is >> e;
    }
    return is;
}

bool print_space_enable = false;
void print() {
    std::cout << '\n';
    print_space_enable = false;
}

template <class Head, class... Tail>
void print(Head&& head, Tail&&... tail) {
    if (print_space_enable) std::cout << " ";
    std::cout << fixed << setprecision(15) << head;
    print_space_enable = true;
    print(std::forward<Tail>(tail)...);
}

template<typename T>
void print(vector<T> v) {
    for (size_t i = 0; i < v.size(); i++) {
        if (i > 0) std::cout << " ";
        std::cout << v[i];
    }
    std::cout << '\n';
}

template<class T>
vector<T> make_vec(size_t n, T val) {
    return vector<T>(n, val);
}

template<class... Ts>
auto make_vec(size_t n, Ts... ts) {
    return vector<decltype(make_vec(ts...))>(n, make_vec(ts...));
}

bool is_overflow(Int a, Int b) {
    return a > INF / b;
}

void solve() {
    Int n, q;
    cin >> n >> q;
    vector<Int> a(n);
    cin >> a;
    vector<Int> k(q);
    cin >> k;
    a.push_back(INF);
    sort(all(a));
    for (Int i = 0; i < q; i++) {
        Int ok = 3e18;
        Int ng = -1;
        while (abs(ok - ng) > 1) {
            Int mid = (ok + ng) / 2;
            Int num = upper_bound(all(a), mid) - a.begin();
            if (mid - num >= k[i]) {
                ok = mid;
            } else {
                ng = mid;
            }
        }
        print(ok);
    }
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    solve();
    //Int _t; cin >> _t; while (_t--) solve();
    return 0;
}


#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <queue>
#include <set>
#include <map>
using namespace std;

#define ll long long
#define ld long double
#define rep(i, n) for(ll i = 0; i < n; ++i)
#define rep2(i, a, b) for(ll i = a; i <= b; ++i)
#define rep3(i, a, b) for(ll i = a; i >= b; --i)
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define eb emplace_back
#define vi vector<int>
#define vll vector<ll>
#define vpi vector<pii>
#define vpll vector<pll>

#define fi first
#define se second
#define all(c) begin(c), end(c)
#define SUM(v) accumulate(all(v), 0LL)
#define MIN(v) *min_element(all(v))
#define MAX(v) *max_element(all(v))
#define lb(c, x) distance((c).begin(), lower_bound(all(c), (x)))
#define ub(c, x) distance((c).begin(), upper_bound(all(c), (x)))

const string YESNO[2] = {"NO", "YES"};
const string YesNo[2] = {"No", "Yes"};
const string yesno[2] = {"no", "yes"};
void YES(bool t = 1) { cout << YESNO[t] << endl; }
void Yes(bool t = 1) { cout << YesNo[t] << endl; }
void yes(bool t = 1) { cout << yesno[t] << endl; }

int main() {
    int A, B; cin >> A >> B;

    int ans = 1;
    for (int i = 1; i < 200500; i++) {
        int r = 0;
        if (A % i != 0) r = i - A % i;
        if (B - A >= i + r) ans = i;
    }
    cout << ans << endl;
    return 0;
}

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

int charToInt(char c){
    char zero_num = '0';
    return (int)c - (int)zero_num;
}

signed main(){
    int N; cin>>N;
    int M; cin>>M;
    vec_int a(M);
    vec_int b(M);
    rep(i,M)cin>>a.at(i)>>b.at(i);
    vec_int c(N); rep(i,N)cin>>c.at(i);
    vector<vec_int> G(N+1);
    rep(i,M){
        G.at(a.at(i)).push_back(b.at(i));
        G.at(b.at(i)).push_back(a.at(i));
    }
    map<P, int> path_map;
    rep(i, M){
        path_map[make_pair(a.at(i), b.at(i))] = i;
        path_map[make_pair(b.at(i), a.at(i))] = i;
    }
    vector<string> ans(M,"");
    rep(i,M){
        if(c.at(a.at(i)-1)>c.at(b.at(i)-1)){
            ans.at(i) = "->";
        }else if(c.at(a.at(i)-1)<c.at(b.at(i)-1)){
            ans.at(i) = "<-";
        }
    }

    rep(i,M){
        if(ans.at(i)==""){
            vec_int visited(N+1, 0);
            visited.at(a.at(i)) =1;
            stack<P> st;
            st.push(make_pair(b.at(i), a.at(i))); // node, parent
            int node_val = c.at(a.at(i)-1);
            while(!st.empty()){
                int node = st.top().first;
                int parent = st.top().second;
                st.pop();
                int ind = path_map[make_pair(parent, node)];
                if(ans.at(ind)!="")continue;
                if(a.at(ind)==parent && b.at(ind)==node){
                    ans.at(ind) = "->";
                }else{
                    ans.at(ind) = "<-";
                }
                for(auto next_node: G.at(node)){
                    if(next_node==parent)continue;
                    if(c.at(next_node-1)!=node_val)continue;
                    st.push(make_pair(next_node, node));
                }
            }
        }
    }
    rep(i,M){
        cout<<ans.at(i)<<endl;
    }

    return 0;
}


/*
Author : Xinyuan
*/
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for(int i = 0; i < n; i++)
#define all(x) (x).begin(), (x).end()
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<PII> VII;
typedef vector<VI> VVI;
typedef long long int  ll;
const int INF = 1e9 + 7;
const int mod = 1e9 + 7;
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
int nxt() {int x;scanf("%d", &x);return x;}

int main(){
    int x[4];
    int lowest = 101;
    for (int i = 0; i < 4; i++) {
        cin >> x[i];
        if ((int) x[i] < lowest) {
            lowest = (int) x[i];
        }
    }
    cout << lowest;
}

#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <cmath>
#include <algorithm>
#include <climits>
#include <iomanip>
#define endl "\n"
#define debug(x) cout << #x << " : " << x << endl;
#define debug2(x, y) cout << #x << " : " << x  << ", " << #y << " : " << y << endl;
#define FASTIO ios_base::sync_with_stdio(false),cin.tie(0);
typedef long long ll;
using namespace std;

int main()
{
	FASTIO

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

	int ans = min({a, b, c, d});
	cout << ans << endl;
}


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

typedef long long ll;
typedef pair<ll,ll> pi;
typedef vector <ll> vi;
typedef vector <pi> vpi;
typedef pair<pi,ll> pii;
typedef set <ll> si;
typedef long double ld;
#define f first
#define s second
#define FOR(i,s,e) for(ll i=s;i<=ll(e);++i)
#define DEC(i,s,e) for(ll i=s;i>=ll(e);--i)
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define lbd(x, y) lower_bound(all(x), y)
#define ubd(x, y) upper_bound(all(x), y)
#define aFOR(i,x) for (auto i: x)
#define mem(x,i) memset(x,i,sizeof x)
#define fast ios_base::sync_with_stdio(false),cin.tie(0)

int H,W,grid[501][501];
int main(){
	fast;
	cin >> H >> W;
  	int mn = 1e9, ans = 0;
  	FOR(i,1,H) FOR(j,1,W){
		cin >> grid[i][j]; mn = min(mn, grid[i][j]);
      	ans += grid[i][j];
    }

  	cout << ans - mn * H * W;

}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, a, b) for(int i = a; i < b; i++)
int H, W;
int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    cin >> H >> W;
    vector<vector<ll>> a(H, vector<ll>(W));
    ll mmin = 101;
    for(int i = 0; i < H; i++) {
        for(int j = 0; j < W; j++) {
            {
                cin >> a[i][j];
                mmin = min(mmin, a[i][j]);
            }
        }
    };
    ll s = 0;
    for(int i = 0; i < H; i++) {
        for(int j = 0; j < W; j++) {
            s += abs(a[i][j] - mmin);
        }
    }
    cout << s << endl;
    return 0;
}


#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

const int INF=1<<29;

int h,w;
vector<string> B;

bool vis[2000][2000][2];
int memo[2000][2000][2];

int dfs(int i,int j,int turn){
	if(i==h-1 && j==w-1) return 0;

	int& res=memo[i][j][turn];
	if(vis[i][j][turn]) return res;
	vis[i][j][turn]=true;

	if(turn==0){
		res=-INF;
		if(i<h-1) res=max(res,dfs(i+1,j,1-turn)+(B[i+1][j]=='+'?1:-1));
		if(j<w-1) res=max(res,dfs(i,j+1,1-turn)+(B[i][j+1]=='+'?1:-1));
	}
	else{
		res=INF;
		if(i<h-1) res=min(res,dfs(i+1,j,1-turn)-(B[i+1][j]=='+'?1:-1));
		if(j<w-1) res=min(res,dfs(i,j+1,1-turn)-(B[i][j+1]=='+'?1:-1));
	}
	return res;
}

int main(){
	cin>>h>>w;
	B.resize(h);
	rep(i,h) cin>>B[i];

	int res=dfs(0,0,0);
	puts(res>0?"Takahashi":res==0?"Draw":"Aoki");

	return 0;
}

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <queue>
#include <climits>
#include <utility>
typedef long long ll;
using namespace std;

int main(void){
  int h, w, i, j;
  string buff;
  vector<vector<int> > field, score;

  cin >> h >> w;
  field.resize(h,vector<int>(w));
  score.resize(h,vector<int>(w));
  for(i=0;i<h;i++){
    cin >> buff;
    for(j=0;j<w;j++){
      if(buff[j]=='+') field[i][j] = 1;
      else field[i][j] = -1;
    }
  }

  if((h+w)%2==0){
    score[h-1][w-1] = field[h-1][w-1];
  }
  else{
    score[h-1][w-1] = field[h-1][w-1] * -1;
  }

  j = w-1;
  for(i=h-2;i>=0;i--){
    if((i+j)%2==0){
      score[i][j] = score[i+1][j] + field[i][j];
    }
    else{
      score[i][j] = score[i+1][j] - field[i][j];
    }
  }
  i = h-1;
  for(j=w-2;j>=0;j--){
    if((i+j)%2==0){
      score[i][j] = score[i][j+1] + field[i][j];
    }
    else{
      score[i][j] = score[i][j+1] - field[i][j];
    }
  }

  for(i=h-2;i>=0;i--){
    for(j=w-2;j>=0;j--){
      if((i+j)%2==0){
        score[i][j] = min(score[i+1][j],score[i][j+1]) + field[i][j];
      }
      else{
        score[i][j] = max(score[i+1][j],score[i][j+1]) - field[i][j];
      }
    }
  }

  if(h==1){
    if(w==1){
      cout << "Draw" << endl;
      return 0;
    }
    score[0][0] = score[0][1];
  }
  else if(w==1){
    score[0][0] = score[1][0];
  }
  else{
    score[0][0] = min(score[1][0],score[0][1]);
  }

  if(score[0][0]>0){
    cout << "Aoki" << endl;
  }
  else if(score[0][0]<0){
    cout << "Takahashi" << endl;
  }
  else{
    cout << "Draw" << endl;
  }

  return 0;
}


// Create your own template by modifying this file!
#include <string>
#include <vector>
#include <climits>
#include <cstring>
#include <map>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <cassert>
#include <deque>
#include <stack>
#include <functional>
#include <bitset>
#include <numeric>
#define int LL
#define SZ(X) ((int)(X).size())
#define ALL(X) (X).begin(), (X).end()
#define REP(I, N) for (int I = 0; I < (N); ++I)
#define REPP(I, A, B) for (int I = (A); I < (B); ++I)
#define FOR(I, A, B) for (int I = (A); I <= (B); ++I)
#define FORS(I, S) for (int I = 0; S[I]; ++I)
#define RS(X) scanf("%s", (X))
#define SORT_UNIQUE(c) (sort(c.begin(),c.end()), c.resize(distance(c.begin(),unique(c.begin(),c.end()))))
#define GET_POS(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin())
#define CASET int ___T; scanf("%d", &___T); for(int cs=1;cs<=___T;cs++)
#define MP make_pair
#define PB emplace_back
#define MS0(X) memset((X), 0, sizeof((X)))
#define MS1(X) memset((X), -1, sizeof((X)))
#define LEN(X) strlen(X)
#define F first
#define S second
using namespace std;
typedef long long LL;
typedef unsigned long long ULL;
typedef long double LD;
typedef pair<int,int> PII;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<PII> VPII;
typedef pair<LL,LL> PLL;
typedef vector<PLL> VPLL;
template<class T> void _R(T &x) { cin >> x;  }
void _R(int64_t &x) { scanf("%lld", &x);  }
void _R(double &x) { scanf("%lf", &x);  }
void _R(char &x) { scanf(" %c", &x);  }
void _R(char *x) { scanf("%s", x);  }
void R() {}
template<class T, class... U> void R(T &head, U &... tail) { _R(head); R(tail...);  }
template<class T> void _W(const T &x) { cout << x;  }
void _W(const int64_t &x) { printf("%lld", x);  }
void _W(const double &x) { printf("%.16f", x);  }
void _W(const char &x) { putchar(x);  }
void _W(const char *x) { printf("%s", x);  }
template<class T,class U> void _W(const pair<T,U> &x) {_W(x.F); putchar(' '); _W(x.S);}
template<class T> void _W(const vector<T> &x) { for (auto i = x.begin(); i != x.end(); _W(*i++)) if (i != x.cbegin()) putchar(' ');  }
void W() {}
template<class T, class... U> void W(const T &head, const U &... tail) { _W(head); putchar(sizeof...(tail) ? ' ' : '\n'); W(tail...);  }
#ifdef DEBUG
 #define debug(...) {printf("[DEBUG] ");W(__VA_ARGS__);}
#else
 #define debug(...)
#endif
int MOD = 1e9+7;
void ADD(LL& x,LL v){x=(x+v)%MOD;if(x<0)x+=MOD;}
/*}}}*/
const int SIZE = 1<<20;
template<class T> void MIN(T& a, const T& b) { a = min(a, b); }
template<class T> void MAX(T& a, const T& b) { a = max(a, b); }

#define MULTITEST 0

void solve() {
    int N, M;
    R(N, M);
    VPII e(M);
    REP(i, M) {
        R(e[i].F, e[i].S);
        e[i].F--;
        e[i].S--;
    }
    VI c(N);
    REP(i, N) {
        R(c[i]);
    }
    VI ans(M, -1);
    vector<VI> adj(N);
    REP(i, M) {
        if (c[e[i].F] == c[e[i].S]) {
            adj[e[i].F].PB(i);
            adj[e[i].S].PB(i);
        } else {
            ans[i] = (c[e[i].F] < c[e[i].S]);
        }
    }
    vector<bool> used(N);
    function<void(int)> dfs;
    dfs = [&](int v) {
        if (used[v]) {
            return;
        }
        used[v] = true;
        for (int i : adj[v]) {
            if (ans[i] < 0) {
                ans[i] = (e[i].S == v);
                dfs(v ^ e[i].F ^ e[i].S);
            }
        }
    };
    REP(v, N) {
        if (!used[v] && adj[v].size()) {
            int i = adj[v].front();
            ans[i] = (e[i].S == v);
            dfs(v ^ e[i].F ^ e[i].S);
        }
    }
    for (int b : ans) {
        assert(b >= 0);
        W(b ? "<-" : "->");
    }
}

#undef int
int main() {
#if MULTITEST
    CASET{
        solve();
    }
#else
    solve();
#endif
    return 0;
}

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

int main() {
    int N;
    cin >> N;
    vector<string> s(N);
    for (int i = 0; i < N; i++) {
        cin >> s[i];
    }

    vector<long long> dp(N + 1, 1);

    for (int i = 1; i <= N; i++) {
        if (s[i - 1] == "AND") {
            dp[i] = dp[i - 1];
        }
        else {
            dp[i] = dp[i - 1] + (1LL << i);
        }
    }

    cout << dp[N] << endl;
}


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

int main(void)
{
    string S;
    bool flag = true;
    cin >> S;

    for(int i = 1; i <= S.length(); i++) {
        if(i % 2 == 1) {
            if('A' <= S[i - 1] && S[i - 1] <= 'Z') {
                cout << "No" << endl;
                flag = false;
                break;
            }
        }
        else {
            if('a' <= S[i - 1] && S[i - 1] <= 'z') {
                cout << "No" << endl;
                flag = false;
                break;
            }
        }
    }
    if(flag == true) {
        cout << "Yes" << endl;
    }
}

#include <iostream>

int main()
{
    int N;
    std::cin >> N;
    int r = N%100;
    if (r) std::cout << N/100 + 1 << std::endl;
    else std::cout << N/100 << std::endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define mod 998244353
#define MOD 1000000007
#define rep(i, n) for(ll i=0; i<(ll)(n); i++)
// aのn乗を求める(modp)
int modPow(ll a, ll n, ll p) {
  if (n == 0) return 1; // 0乗にも対応する場合
  if (n == 1) return a % p;
  if (n % 2 == 1) return (a * modPow(a, n - 1, p)) % p;
  ll t = modPow(a, n / 2, p);
  return (t * t) % p;
}

int main(){
  ll n, m;
  cin >> n >> m;
  string s;
  ll odd = 0, even = 0;
  rep(i, n){
    cin >> s;
    ll count = 0, len = s.size();
    rep(i, len){
      if(s[i] == '1') count++;
    }
    if(count%2 == 0) even++;
    else odd++;
  }
  cout << odd*even << endl;
}

#include <bits/stdc++.h>
using namespace std;
#define deb(k) cerr << #k << ": " << k << "\n";
#define size(a) (int)a.size()
#define fastcin cin.tie(0)->sync_with_stdio(0);
#define st first
#define nd second
#define pb push_back
#define mk make_pair
#define int long long
typedef long double ldbl;
typedef double dbl;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef map<int, int> mii;
typedef vector<int> vint;
#define MAXN 300100
#define MAXLG 20
const int inf = 0x3f3f3f3f;
const ll mod = 1000000007;
const ll linf = 0x3f3f3f3f3f3f3f3f;
const int N = 300100;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

void solve(){
	int n, m;
	cin>>n>>m;
	string s[n];
	map<int, int>f;
	vint a(n);
	for(int i=0;i<n;i++){
		cin>>s[i];
		for(int j=0;j<m;j++){
			a[i] *= 2;
			a[i] += (s[i][j] - '0');
		}
		f[a[i]]++;
	}
	queue<pii>q;
	q.push({0, 0});
	int x = 0, y = 0;
	bitset<(1<<20)> vis;
	vis[0] = 1;
	while(!q.empty()){
		pii a = q.front();
		q.pop();
		if(a.nd == 0) x += f[a.st];
		else y += f[a.st];
		for(int i=0;i<m;i++){
			int aux = a.st ^ (1<<i);
			if(vis[aux]) continue;
			vis[aux] = 1;
			q.push({aux, a.nd^1});
		}
	}
	cout<<x*y<<"\n";

	// Have you read the problem again?
	// Maybe you understood the wrong problem
}

int32_t main(){
	fastcin;
	int t_ = 1;
	//cin>>t_;
	while(t_--)
		solve();
	return 0;
}


#include<bits/stdc++.h>
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define repk(i,a,n) for(int i=a;i<=(n);i++)
#define pb push_back
#define ppb pop_back
#define all(k) k.begin(),k.end()
#define eb emplace_back
#define mp make_pair
#define ll  long long
#define pl pair<ll,ll>
#define vc vector<char>
#define vl vector<ll>
#define vvl vector<vl>
#define vi vector<int>
#define vvi vector<vi>
#define vc vector<char>
#define vpi vector<pi>
#define vpl vector<pl>
#define vvc vector<vc>
#define mi map<int,int>
#define ml map<ll,ll>
template<typename T, typename U> inline bool mn(T& m, U x) { if (m > x) { m = x; return true; } return false; }
#define umap unordered_map<int,int>
using namespace std;

void sol() {
	int n; cin >> n;
	vl ar(n);
	rep(i, 0, n)cin >> ar[i];
	ll cnt = -1, res = *min_element(all(ar));
	while (cnt != res) {
		cnt = res;
		rep(i, 0, n) {
			if (!(ar[i] % res))mn(res, res);
			else
				mn(res, ar[i] % res);

		}
	}

	cout << res;
}
int main() {
	int t = 1; //cin >> t;
	while (t--)sol();

	return 0;
}

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

using namespace std;

#define x first
#define y second

typedef pair<int, int> PII;

const int N = 70010;
int n;
PII a[N];

int main()
{
    cin >> n;
    n = pow(2, n);

    for(int i = 1; i <= n; i ++ )
    {
        cin >> a[i].x;
        a[i].y = i;
    }

    while(n > 2)
    {
        for(int i = 1; i <= n; i += 2 )
        {
            if(a[i].x > a[i + 1].x)
            {
                a[i/2 + 1].x = a[i].x;
                a[i/2 + 1].y = a[i].y;
            }
            else
            {
                a[i/2 + 1].x = a[i + 1].x;
                a[i/2 + 1].y = a[i + 1].y;
            }
        }
        n /= 2;
    }

    if(a[1].x > a[2].x) cout << a[2].y << endl;
    else cout << a[1].y << endl;

    return 0;
}


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

int main()
{
    long long n;

    cin >> n;

    long long sum = 0;

    long long cnt = 0;

    long long i = 0;

    while (sum <= n + 1)
    {
        i++;
        sum += i;
        cnt++;
    }

    cnt--;

    cout << n - cnt + 1 << endl;
}

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

ll b,c;

ll cnt(ll a){
    if(c<a) return 0;
    else return (c-a)/2+1;
}

int main(){
    cin>>b>>c;
    ll ans=0;
    if(b==0){
        ans=cnt(0)+cnt(3);
    }else if(b>0){
        ans=cnt(1)+cnt(4);
        if(c>=2*b) ans+=2*b;
        else ans+=cnt(0)+cnt(3);;
    }else{
        b*=-1;
        ans=cnt(0)+cnt(3);
        if(c>=2*b+1) ans+=2*b;
        else ans+=cnt(1)+cnt(4);
    }
    cout<<ans<<endl;
}


#include <bits/stdc++.h>
#define int long long int
using namespace std;
signed main(){
    ios::sync_with_stdio(0);
	cin.tie(NULL); cout.tie(NULL);
	int t;
	cin>>t;
	while(t--){
        int n;
        cin>>n;
        map<int , int> mp;
        bool ae = true;
        for(int i = 1;i<= n;i++){
            int z;
            cin>>z;
            mp[z]++;
        }
        map<int , int>:: iterator it;
        for(it = mp.begin() ; it!= mp.end();it++){
            if((it->second)%2==0 ){
                ;
            }
            else{
                ae = false;
            }
        }
         if(n%2==0){
            if(ae){
                cout<<"Second\n";
            }
            else{
                cout<<"First\n";
            }
        }
        else{
            cout<<"Second\n";
        }
	}
}


/*
problem :
algorithm :
created : Programmer_juruo
*/

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

#define int long long
#define N 2000005
#define M 2005
#define lowbit(x) x & (-x)
#define F1(i, n) for(int i = 1; i <= n; i++)
#define F(i, a, n) for(int i = a; i <= n; i++)
#define F0(i, n) for(int i = 0; i < n; i++)
#define dbg(x) cout << #x << ":" << x << endl;
#define se second
#define fi first
#define y1 juruo
#define mp make_pair
#define pb push_back
#define arr vector<int>
#define chmin(a, b) a = min(a, b)
#define chmax(a, b) a = max(a, b)

typedef pair <int, int> pii;
typedef priority_queue <int> pq;
typedef long long ll;

const ll inf = 0x3f3f3f3f3f3f3f3f;
const int p = 107;
const int P = 100007;
const int Mod = 1e9+7;

int n, m;
int t[N], l[N], r[N];
vector <pair<int, pair<int, int> > > v;
void work() {
	cin >> n;
	for(int i = 1; i <= n; i++) {
		cin >> t[i] >> l[i] >> r[i];
	}
	int ans = 0;
	for(int i = 1; i <= n; i++) {
		for(int j = i+1; j <= n; j++) {
			v.clear();
			v.pb(mp(l[i], pii(r[i], t[i])));
			v.pb(mp(l[j], pii(r[j], t[j])));
			sort(v.begin(), v.end());
			if(v[0].se.fi > v[1].fi) {
				++ans;
			} else if(v[0].se.fi == v[1].fi) {
				if(v[0].se.se == 1 || v[0].se.se == 3) {
					if(v[1].se.se == 1 || v[1].se.se == 2) {
						++ans;
					}
				}
			}
		}
	}
	cout << ans << endl;
}

signed main() {
  //freopen("1.in", "r", stdin);
  //freopen("1.out", "w", stdout);
  int T = 1;

  //cin >> T;

  while(T--) {
  	work();
  }

  return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define vi vector<int>
#define fo(a,b,c) for(int a=b;a<c;a++)
#define int long long int
#define ff first
#define ss second
#define pb push_back
#define fastio ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
const int mod = 1e9 + 7;
const int cmod = 998244353;
const int N = 3e5 + 5;
const int inf = 1e18 + 2;
int power(int a,int b)
{
    if(b==0)
    return 1;
    else if(b%2==0)
    {
    int c=power(a,b/2);
    return (c*c)%mod;
    }
    else
    return ((a%mod)*(power(a,b-1)%mod))%mod;
}
void solve(int Case)
{
    int n,s=0;
    cin>>n;
    int a[n][3];
    fo(i,0,n)
    {
        fo(j,0,3)
        {
            cin>>a[i][j];
        }
    }
    fo(i,0,n)
    {
        fo(j,i+1,n)
        {
            if(a[i][2]>a[j][2])
            {
                if(a[i][1]<a[j][2])
                s++;
                else if(a[i][1]==a[j][2])
                {
                    if((a[i][0]==1||a[i][0]==2)&&(a[j][0]==3||a[j][0]==1))
                    s++;
                }
            }
            else if(a[i][2]<a[j][2])
            {
                swap(i,j);
                if(a[i][1]<a[j][2])
                s++;
                else if(a[i][1]==a[j][2])
                {
                    if((a[i][0]==1||a[i][0]==2)&&(a[j][0]==3||a[j][0]==1))
                    s++;
                }
                swap(i,j);
            }
            else
            s++;
        }
    }
    cout<<s;
}
int32_t main()
{
    fastio
    int testcase = 1;
    //cin >> testcase;
    int Case = 1;
    while(testcase --)
    {
        solve(Case);
    }
    return 0;
}


#include <iostream>
using namespace std;

int main() {
	char a, b, c;
  cin>>a>>b>>c;
  if (a == b && b==c){
    cout<<"Won";
 }
 else{
  cout<<"Lost";
 }
 return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main(){
    string S;
    cin >> S;

    int ans = 0;
    for (int i = 0; i < S.size(); i++){
        if (S.substr(i, 4) == "ZONe")
            ans++;
    }

    cout << ans << endl;
}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type , less<int> , rb_tree_tag , tree_order_statistics_node_update>
#define int long long int
#define ull unsigned long long
#define pb push_back
#define inf 1e18
#define mk make_pair
#define ld long double
#define mod 1000000007
#define fi first
#define se second
#define fastIO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define test int t; cin>>t; while(t--)
#define setbits __builtin_popcount
#define endl '\n'
#define LOCAL
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i));}
sim, class b dor(pair < b, c > d) {
    ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
    *this << "[";
    for (auto it = d.b; it != d.e; ++it)
        *this << ", " + 2 * (it == d.b) << *it;
    ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "
int32_t main()
{
    fastIO;
    int a,b,c;
    cin>>a>>b>>c;
    if(a<0 && c%2 && b>=0)
    {
        cout<<"<";
        return 0;
    }
    if(b<0 && c%2 && a>=0)
    {
        cout<<">";
        return 0;
    }
    a=abs(a);
    b=abs(b);
    ld val,val1;
    val=(ld)c*log10((ld)a);
    val1=(ld)c*log10((ld)b);
    if(val<val1)
    {
        cout<<"<";
    }
    else
    if(val>val1)
    {
        cout<<">";
    }
    else{
        cout<<"=";
    }
}

#include<stdio.h>
#include<algorithm>
#include <bits/stdc++.h>
typedef long long int ll;

using namespace std;

int main() {
    ll a, b, c;
    cin >> a >> b >> c;
    //coditions for a
    if(a==b){
        cout<<"="<<endl;
    }
    else if(a==0&&a<b){
        cout<<"<"<<endl;
    }
    else if(a==0 && a>b && c%2!=0){
        cout<<">"<<endl;
    }
    else if(a==0 && a>b && c%2==0){
        cout<<"<"<<endl;
    }
    else if(a==0&&a<b){
        cout<<"<"<<endl;
    }
    else if(a<0 && abs(a)<b && c%2==0){
        cout<<"<"<<endl;
    }
    else if(a<0 && abs(a)<b && c%2!=0){
        cout<<"<"<<endl;
    }
    else if(a<0 && abs(a)>b && c%2==0){
        cout<<">"<<endl;
    }
    else if(a<0 && abs(a)>b && c%2!=0){
        cout<<"<"<<endl;
    }
    else if(a<0 && abs(a)==b && c%2!=0){
        cout<<"<"<<endl;
    }
    else if(a<0 && abs(a)==b && c%2==0){
        cout<<"="<<endl;
    }

    //conditions for b
    else if(b==0&&b<a){
        cout<<">"<<endl;
    }
    else if(b==0 && b>a && c%2!=0){
        cout<<"<"<<endl;
    }
    else if(b==0 && b>a && c%2==0){
        cout<<">"<<endl;
    }
    else if(b==0&&b<a){
        cout<<">"<<endl;
    }
    else if(b<0 && abs(b)<a && c%2==0){
        cout<<">"<<endl;
    }
    else if(b<0 && abs(b)<a && c%2!=0){
        cout<<">"<<endl;
    }
    else if(b<0 && abs(b)>a && c%2==0){
        cout<<"<"<<endl;
    }
    else if(b<0 && abs(b)>a && c%2!=0){
        cout<<">"<<endl;
    }
    else if(b<0 && abs(b)==a && c%2!=0){
        cout<<">"<<endl;
    }
    else if(b<0 && abs(b)==a && c%2==0){
        cout<<"="<<endl;
    }
    //overlapping conditions
    else if(a>0 && a>b){
        cout<<">"<<endl;
    }
    else if(a>0 && a<b){
        cout<<"<"<<endl;
    }
    else if(b>0 && a>b){
        cout<<">"<<endl;
    }
    else if(b>0 && a<b){
        cout<<"<"<<endl;
    }
}


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

// #define TEST(a) cout<<"Case #"<<a<<": ";
#define int long long
// #define ll unsigned long long
// #define Uint unsigned int
#define rep(i, a, b) for (int i = a; i < b; i++)
#define vi vector<int>
#define all(a) a.begin(),a.end()
#define pb push_back
#define mii map<int, int>
#define INF 100000000
#define take(a) int a;cin >> a;
#define MOD 1000000007
#define pii pair<int,int>
#define MAX_N 1000

int32_t main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int n;
    cin>>n;
    vi a;
    mii cnt;
    rep(i,0,n)
    {
        take(val);
        a.pb(val);
        if(cnt.find(val) == cnt.end())
        {
            cnt.insert({val,1});
        }
        else
        {
            cnt[val]++;
        }
    }
    int ans = 0;
    for(int ele:a)
    {
        ans += (n-cnt[ele]);
    }
    cout<<ans/2;
    return 0;
}

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

using namespace std;

vector <int> Liczby(200003);

int main()
{
    int Ilosc;
    long long wynik = 0, AktualnyWynik = 0;

    cin >> Ilosc;

    for(int i = 0; i < Ilosc; ++i)
    {
        cin >> Liczby[i];
        AktualnyWynik += Liczby[i];
    }

    sort(Liczby.begin(), Liczby.begin() + Ilosc);

    AktualnyWynik -= Liczby[0];

    for(int i = 1; i < Ilosc; ++i)
    {
        long long tmp = Liczby[i - 1];
        tmp *= (Ilosc - i);
        wynik += AktualnyWynik - tmp;
        AktualnyWynik -= Liczby[i];
    }

    cout << wynik;
    return 0;
}


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

using namespace std;

bool fg[10005];

int main() {
	int n;
	cin>>n;
	for(int i=6;6*i<=10000;i++) {
		cout<<6*i<<" ";
		fg[6*i]=true;
		n--;
		if(n==2) {
			cout<<"10 15";
			cout<<endl;
			return 0;
		}
	}
	for(int i=6;10*i<=10000;i++) {
		if(fg[10*i]==false) {
			cout<<10*i<<" ";
			fg[10*i]=true;
			n--;
		}
		if(n==1) {
			cout<<"15"<<endl;
			return 0;
		}
	}
	for(int i=6;15*i<=10000;i++) {
		if(fg[15*i]==false) {
			cout<<15*i<<" ";
			fg[15*i]=true;
			n--;
		}
		if(n==0) {
			break;
		}
	}
}


//{{{
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using VLL = vector<LL>;
using vi = vector<int>;
using pii = pair<int, int>;
#define sz(x) (int)((x).size())
#define all(x) (x).begin(), (x).end()
#define clr(a, b) memset(a, b, sizeof(a))
#ifdef LOCAL
#include "prettyprint.hpp"
// clang-format off
void _print() { cerr << "]\033[0m\n"; }
template <typename T> void __print(T x) { cerr << x; }
template <typename T, typename... V> void _print(T t, V... v) { __print(t); if (sizeof...(v)) cerr << ", "; _print(v...); }
#define debug(x...) cerr << "\033[1;34m[" << #x << "] = \033[1;32m["; _print(x)
#define debug_arr(x...) cerr << "\033[1;34m[" << #x << "] = \033[1;32m" << (x) << "\033[0m\n"
#else
#define debug(x...)
#define debug_arr(x...)
#endif
// clang-format on
//}}}

int k;
int n;
string s;

const int mod = 1e9 + 7;
inline int ch2dig(char ch)
{
    if (ch >= 'A' && ch <= 'F') return ch - 'A' + 10;
    return ch - '0';
}

const int N = 2e5 + 10;
LL dp[N][20];
LL cnt[N];

LL dfs(int pos, int st, bool bound, bool zeros)
{
    if (pos == -1) return __builtin_popcount(st) == k;

    LL ret = 0;
    if (bound && zeros)
    {
        int ed = bound ? ch2dig(s[pos]) : 15;
        for (int i = 0; i <= ed; i++)
        {
            int new_st = st;
            if (i) new_st |= (1 << i);

            ret += dfs(pos - 1, new_st, bound && i == ed, zeros && i == 0);
            ret %= mod;
        }
        debug(pos, st, bound, zeros, ret);
        return ret;
    }

    if (bound && !zeros)
    {
        int ed = bound ? ch2dig(s[pos]) : 15;
        for (int i = 0; i <= ed; i++)
        {
            int new_st = st | (1 << i);

            ret += dfs(pos - 1, new_st, bound && i == ed, 0);
            ret %= mod;
        }
        debug(pos, st, bound, zeros, ret);
        return ret;
    }

    if (!bound && zeros)
    {
        for (int i = 0; i <= 15; i++)
        {
            int new_st = st;
            if (i) new_st |= (1 << i);

            ret += dfs(pos - 1, new_st, 0, zeros && i == 0);
            ret %= mod;
        }
        debug(pos, st, bound, zeros, ret);
        return ret;
    }

    if (dp[pos][__builtin_popcount(st)] != -1) return dp[pos][__builtin_popcount(st)];
    if (!bound && !zeros)
    {
        for (int i = 0; i <= 15; i++)
        {
            int new_st = st | (1 << i);

            ret += dfs(pos - 1, new_st, 0, 0);
            ret %= mod;
        }
    }
    debug(pos, st, bound, zeros, ret);
    return dp[pos][__builtin_popcount(st)] = ret;
}

int main()
{
#ifdef LOCAL
    freopen("in", "r", stdin);
    // freopen("out", "w", stdout);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0);

    while (cin >> s >> k)
    {
        clr(dp, -1);
        n = sz(s);
        reverse(all(s));

        LL ans = dfs(n - 1, 0, 1, 1);
        cout << ans << endl;
    }

    return 0;
}

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
const int MAX_N = 19;
const int MAX_M = 105;
ll dp[(1 << MAX_N)];
int X[MAX_M],Y[MAX_M],Z[MAX_M];

int main()
{
	int N,M;
	cin >> N >> M;
	rep(i,M)
	{
		cin >> X[i] >> Y[i] >> Z[i];
		//X[i] = i%(N-1)+1; Y[i] = i%(N-1)+1; Z[i] = i%N;
	}
	dp[0] = 1;
	for (int bits = 0; bits < (1 << N); ++bits)
	{
		vector<int> ppcnt(N+1,0);
		rep(i,N) {ppcnt[i+1] = ppcnt[i] + ((bits >> i) & 1);}
		/*
		rep(i,N+1) cout << ppcnt[i] << " ";
		cout << endl;
		*/
		rep(i,N)
		{
			if ((bits >> i) & 1 != 0) continue;
			bool ok = true;
			int c;
			rep(j,M)
			{
				if (i+1 <= Y[j]) c = 1;
				else c = 0;
				if (X[j] == ppcnt[N]+1 && ppcnt[Y[j]]+c > Z[j]) ok = false;
			}
			if (ok) dp[bits | (1 << i)] += dp[bits];
		}
		//cout << bits << " " << dp[bits] << endl;
	}
	cout << dp[(1 << N) - 1] << endl;
	return 0;
}


#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int main(){
	int N;
	cin >> N;
	vector<int> A;
	vector<int> B;
	for (int i = 0; i < N; i++){
		int a;
		cin >> a;
		A.push_back(a);
	}
	for (int i = 0; i < N; i++){
		int b;
		cin >> b;
		B.push_back(b);
	}

	int minn = A[0];
	int maxx = B[0];

	for (int i = 1; i < N; i++){
		minn = max(minn, A[i]);
		maxx = min(maxx, B[i]);
	}
	if (maxx >= minn)
		cout << maxx-minn+1;
	else
		cout << 0;
}

#include <iostream>
#include <algorithm>
#include <utility>
#include <vector>
#include <string>

using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = (n) - 1; i >= 0; i--)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define RFOR(i, a, b) for (int i = (a); i > (b); i--)
#define ALL(a) (a).begin(), (a).end()

int main() {
    int N, A[1000000];
    cin >> N;
    int size = 1 << N;
    REP(i, size) cin >> A[i];

    int half = size / 2;
    int maxi1 = max_element(A, A + half) - A, maxi2 = max_element(A + half, A + size) - A;
    if (A[maxi1] > A[maxi2]) cout << maxi2 + 1 << endl;
    else cout << maxi1 + 1 << endl;
    return 0;
}


#include <bits/stdc++.h>
#define rep(i, n) for (ll i=0; i<n; ++i)
#define all(obj) (obj).begin(),(obj).end()
using namespace std;
typedef long long ll;
long long GCD(long long x, long long y) { return y ? GCD(y, x%y) : x; }

int main(){
    int x;
    cin >> x;
    cout << max(x, 0) << endl;
    return 0;
}

#include <iostream>
#include <string>
#include <math.h>

using namespace std;

long long n;

long long bin_search(long long l, long long r) {
  if (r == l) return l;
  long long m = l + (r - l) / 2;
  if (m * m + m > 2 * n + 2) {
    return bin_search(l, m);
  } else {
    return bin_search(m + 1, r);
  }
}

int main() {
  cin >> n;
  cout << n + 1 - bin_search(1, 2e9) + 1;
  return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#ifdef _WIN32
#define getchar_unlocked _getchar_nolock
#endif
#define int long long
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define pf push_front
#define ppb pop_back
#define ppf pop_front
#define eb emplace_back
#define g0(a) get<0>(a)
#define g1(a) get<1>(a)
#define g2(a) get<2>(a)
#define g3(a) get<3>(a)
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef double db;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef tuple<int, int, int> iii;
typedef tuple<int, int, int, int> iiii;
typedef tree<ii, null_type, less<ii>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	int X;
	cin >> X;
	int OX = X;
	X++;
	while (X % 100) X++;
	cout << X - OX << '\n';
}

//in dp prefix suffix sum helps..
#include<iostream>
#include<vector>
#include<string.h>
#include<algorithm>
#include<iomanip>
#include<cmath>
#include<stack>
#include <iterator>
#include <map>
#include<list>
#include <fstream>
#include<unordered_map>
#include<set>
#include<queue>
#define int  long long
#define double long double
#define pb   push_back
#define mp   make_pair
#define pii  pair<int,int>
#define pip pair<int, pair<int, int> >
#define viv vector<vector<int> >
#define vip vector< pair<int, int> >
#define vi vector<int>
#define mii  map<pii, int>
#define qu queue<int>
#define set set<int>
#define multi multiset<int>
#define stack stack<int>
#define fi first
#define se second
#define reverse(s) reverse(s.begin(), s.end())
#define sort1(v) sort(v.begin(), v.end())
#define it iterator
#define pq1 priority_queue <pii, vector<pii>, greater<pii> >
#define mem(x, y) memset(x, (int)y, sizeof(x))
#define ps(x,y) fixed<<setprecision(y)<<x
// author :: Anurag Anand.
using namespace std;
int z=  1e9+7;
//int z= 998244353;
int gcd(int a, int b){
    if(a==0)return b;
    if(b==0)return a;
    return gcd(b, a%b);
}
int power(int a,int b)
{
	int res=1;
	while(b)
	{
		if(b&1)
		{
			res=(res*a)%z;
			b--;
		}
		else
		{
			a=(a*a)%z;
			b=b>>1;
		}
	}
	return res;
}
vi sieve;
// vi seg;
// void arrange(int i, int v, int x, int lx, int rx){
// 	if(rx-lx==1){
// 		seg[x]+=v;
// 		return;
// 	}
// 	int m= (lx+rx)/2;
// 	if(i<m) arrange(i, v, 2*x+1, lx, m);
// 	else arrange(i, v, 2*x+2, m, rx);
// 	seg[x]=seg[2*x+1]+seg[2*x+2];
// }
// int calc(int l, int r, int x, int lx, int rx){
// 	if(l>=rx||r<=lx) return 0;
// 	if(lx>=l&&rx<=r) return seg[x];
// 	int mid=(lx+rx)/2;
// 	int sl= calc(l, r, 2*x+1, lx, mid), sr= calc(l, r, 2*x+2, mid, rx);
// 	return sl+sr;
// }
int32_t main()
{
    ios_base::sync_with_stdio(false);
	cin.tie(NULL);
    cout.tie(NULL);
	vi pp;
	pp.assign(1000001, 0);
	for(int i=2;i<1000;i++){
		if(!pp[i]){
			for(int j=i*i;j<=1000000;j+=i){
				pp[j]=1;
			}
		}
	}
	for(int i=2;i<=1000000;i++) if(!pp[i]) sieve.pb(i);
	int t;
	t=1;
	//cin>>t;
	while(t--){
		int x;
		cin>>x;
		cout<<(100-x%100)<<"\n";
	}
}


#include <bits/stdc++.h>
template<class T> inline bool chmin(T&a, T b){if(a > b){a = b; return true;}else{return false;}}
template<class T> inline bool chmax(T&a, T b){if(a < b){a = b; return true;}else{return false;}}
#define ll long long
#define double long double
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,n) for(int i=1;i<=(n);i++)
#define mod (ll)(1e9+7)
#define inf (ll)(3e18+7)
#define eps (double)(1e-9)
#define pi (double) acos(-1)
#define P pair<int,int>
#define PiP pair<int,pair<int,int>>
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
using namespace std;

int n;
vector<vector<int>> G(100010);

//ret = First - Second
//rに動かした人がplayer == 0, player == 1なら交代

P solve(int r){
    int ret = 1;
    int player = 1, cnt = 0;
    priority_queue<int> que;
    for(auto v : G[r]){
        P now = solve(v);
        if(!now.second && now.first < 0)ret += now.first;
        if(!now.second && now.first > 0)cnt += now.first;
        if(now.second)que.push(-now.first);
    }
    while(!que.empty()){
        int t = -que.top();
        que.pop();
        if(player)ret += t;
        else ret -= t;
        player ^= 1;
    }
    if(player)ret += cnt;
    else ret -= cnt;
    return {ret, player};
}

int main() {
    cin >> n;
    rep(i, n-1){
        int p;
        cin >> p;
        G[p-1].push_back(i+1);
    }
    cout << (n+solve(0).first)/2 << endl;
}

#define fast ios::sync_with_stdio(false); cin.tie(0)
#define foru(i, k, n) for (int i = k; i < n; i++)
#define ford(i, k, n) for (int i = k; i >= n; i--)
#define pb push_back
#define ff first
#define ss second

#include <iostream>
#include <vector>
#include <algorithm>
#include <bitset>
#include <queue>

using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

int main() {
	fast;
	int n;
	cin >> n;
	vector<ll> a(n, 0), b = a;
	foru(i, 0, n)cin >> a[i];
	foru(i, 0, n)cin >> b[i];
	ll sm = 0;
	foru(i, 0, n)sm += (a[i] * b[i]);
	if (sm == 0)cout << "Yes";
	else cout << "No";
	return 0;
}


#include <iostream>

using namespace std;

int main()
{
    unsigned long long int n;
    cin>>n;
    unsigned long long i=1;
    while(i*(i+1)/2<=n+1)
          i++;
    cout<<n-i+2<<endl;
    return 0;
}

//#define _GLIBCXX_DEBUG
#include<bits/stdc++.h>
//#include<ctime>
//#include<algorithm>//next_permutation
#define rep(i,n) for (int i = 0;i < (n);i++)
#define all(v) v.begin(),v.end()
#define dec(n) cout << fixed << setprecision(n);
#define large "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define small "abcdefghijklmnopqrstuvwxyz"
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vc = vector<char>;
using vvc = vector<vc>;

ll gcd(ll a,ll b){
  if(b == 0) return a;
  return gcd(b , a % b);
}

const ll MOD = 1000000007;
const ll MAX = 2000001;

ll mod(ll a){
  return a % MOD;
}

ll lcm(ll a,ll b){
  return (a*b)/gcd(a,b);
}

//ここに適切な判断条件を書く
bool isOK(ll index,ll n) {
  if((long double)((index+1) <= 2.0*(long double)(n+1)/(long double)(index)) and ((index*(index+1))/2 <= n+1)) return true;
  return false;
}

//臨機応変に引数を書き換える
int binary_search(ll n) {
    ll ok = 0;
    ll ng = min(n,ll(2000000002));

    while (abs(ok - ng) > 1) {
        ll mid = (ok + ng) / 2;

        if (isOK(mid,n)) ok = mid;
        else ng = mid;
    }
    return ok;
}

int main(){

  ll n; cin >> n;

  if(n == 1){
    cout << 1 << endl;
    return 0;
  }
  if(n == 2){
    cout << 1 << endl;
    return 0;
  }
  cout << n-binary_search(n)+1 << endl;

  /*cout << ( double(1000000002+1) <= 2.0*double(109109109109109109
+1)/double(1000000002)
 ? "Yes" : "No") << endl;
  */

}