#include <bits/stdc++.h>

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

typedef long long ll;

const int INF = 1 << 30;
const ll LLINF = 1LL << 60;

int mod = 1000000007;

int dp[3030][10][50];

void init(){
    rep(i, 3030) rep(j, 10) rep(k, 50) dp[i][j][k] = 0;
    dp[0][0][0] = 1;
}

int main(void){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    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];
    int ok = 0, ng = INF;
    int m = (ok+ng)/2;
    while(abs(ok-ng) > 1){
        //cout << "m: " << m << endl;
        init();
        rep(i, N){
            int val = 0;
            if(A[i] >= m) val += (1 << 4);
            if(B[i] >= m) val += (1 << 3);
            if(C[i] >= m) val += (1 << 2);
            if(D[i] >= m) val += (1 << 1);
            if(E[i] >= m) val += (1 << 0);
            //cout << i << ": " << val << endl;
            for(int ninzuu = 0; ninzuu < 5; ninzuu++){
                rep(now_state, (1 << 5)){
                    dp[i+1][ninzuu][now_state] = max(dp[i+1][ninzuu][now_state], dp[i][ninzuu][now_state]);
                    dp[i+1][ninzuu+1][now_state|val] = max(dp[i+1][ninzuu+1][now_state|val], dp[i][ninzuu][now_state]);
                }
            }
        }
        if(dp[N][3][(1 << 5)-1] == 1) ok = m;
        else ng = m;
        m = (ok+ng)/2;
    }
    cout << ok << endl;
    return 0;
}

#define _USE_MATH_DEFIMES
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <clocale>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

const int MOD = 1'000'000'007;
const int MOD2 = 998'244'353;
const int INF = 1'000'000'000; //1e9
const int NIL = -1;
const long long LINF = 1'000'000'000'000'000'000; // 1e18
const long double EPS = 1E-10;

template<class T, class S> inline bool chmax(T &a, const S &b){
    if(a < b){
        a = b; return true;
    }
    return false;
}
template<class T, class S> inline bool chmin(T &a, const S &b){
    if(b < a){
        a = b; return true;
    }
    return false;
}

bool okay(int x, std::vector<std::vector<int>> &M){
    std::set<int> s;
    for(auto &e: M){
        int bit{};
        for(auto m: e){
            bit *= 2;
            bit |= (m >= x);
        }

        s.insert(bit);
    }
    for(int a: s) for(int b: s) for(int c: s){
        if((a | b | c) == 31) return true;
    }
    return false;
}

int main(){
    int N; std::cin >> N;
    std::vector<std::vector<int>> mem(N, std::vector<int>(5));
    for(auto &e: mem){
        for(auto &m: e) std::cin >> m;
    }
    int ok{}, ng{INF + 1};
    while(ng > ok + 1){
        int mid{(ok + ng) / 2};
        if(okay(mid, mem)) ok = mid;
        else               ng = mid;
    }
    std::cout << ok << std::endl;
    return 0;
}


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

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    long long a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, m = 0, n = 0, p = 0, q = 0, mod = 1000000007, pi = 3.1415926535;
    string s1, s2;
    char moji;

    cin >> a >> b >> c;
    cout << 21-a-b-c << endl;
    return 0;
}

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

using namespace std;
int main(int argc, char *argv[]){
    int a;
    int b;
    int c;
    std::cin >> a >> b >> c;
    int result = 0;
    result += (7 - a);
    result += (7 - b);
    result += (7 - c);
    std::cout << result << std::endl;
    return 0;
}


#include <bits/stdc++.h>
#define rep(i,n) for(ll i=0;i<(n);i++)
#define rrep(i,n) for(ll i = 1; i <= (n); ++i)
#define drep(i,n) for(ll i = (n)-1; i >= 0; --i)
#define all(v) v.begin(),v.end()
#define len(x) (ll)(x).length()
#define maxs(x,y) x = max(x,y)
#define mins(x,y) x = min(x,y)
#define pb push_back
#define sz(x) (ll)(x).size()
#define v(T) vector<T>
#define vv(T) vector<vector<T>>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<P> vp;
ll gcd(ll a,ll b){if(a%b==0){return b;}else{return(gcd(b,a%b));}}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
const int INF=1e9;
const ll MX = 1e18;
const ll mod=998244353;
const int di[] = {-1,0,1,0};
const int dj[] = {0,-1,0,1};
const double PI=acos(-1);
const string tr="abcdefghijklmnopqrstuvwxyz";
#define dame { puts("-1"); return 0;}
#define yn {puts("Yes");}else{puts("No");}
#define YN {puts("YES");}else{puts("NO");}
const ll MAX = 1000001;
long long fac[MAX], finv[MAX], inv[MAX];
ll llpow(ll n,ll i){if(i==0){return 1;}ll cnt=n;for(ll j=0;j<i-1;j++){n*=cnt;}return n;}
bool ip/*is_prime*/(long long N) {if (N == 1) return false;for (long long i = 2; i * i <= N; ++i) {if (N % i == 0) return false;}return true;}
int digit(ll N) {int ans = 0;while (N) {++ans;N /= 10;}return ans;}
vector<pair<ll,ll>> pf/*prime_factorize*/(ll n){vector<pair<ll,ll>> res;for(ll a=2;a*a<=n;a++){if(n%a!=0) continue;ll ex=0;while(n%a==0){ex++;n/=a;}res.pb({a,ex});}if(n!=1) res.pb({n,1});return res;}
vector<ll> div/*divisor*/(ll n){  vector<ll> res={1};for(ll a=2;a*a<=n;a++){if(n%a!=0) continue;ll b=n/a;res.pb(b);if(b!=a) res.pb(a);}sort(all(res));return res;}
struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x((x%mod+mod)%mod){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this;}
  mint operator+(const mint a) const { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= a;}
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const { return pow(mod-2);}
  mint& operator/=(const mint a) { return *this *= a.inv();}
  mint operator/(const mint a) const { return mint(*this) /= a;}
};
istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}
struct combination {
  vector<mint> fact, ifact;
  combination(int n):fact(n+1),ifact(n+1) {
    assert(n < mod);
    fact[0] = 1;
    for (int i = 1; i <= n; ++i) fact[i] = fact[i-1]*i;
    ifact[n] = fact[n].inv();
    for (int i = n; i >= 1; --i) ifact[i-1] = ifact[i]*i;
  }
  mint operator()(int n, int k) {
    if (k < 0 || k > n) return 0;
    return fact[n]*ifact[k]*ifact[n-k];
  }
} c(200005);
struct UnionFind {
  vector<int> d;
  UnionFind(int n): d(n,-1) {}
  int root(int x) {
    if (d[x] < 0) return x;
    return d[x] = root(d[x]);
  }
  bool unite(int x, int y) {
    x = root(x); y = root(y);
    if (x == y) return false;
    if (d[x] > d[y]) swap(x,y);
    d[x] += d[y];
    d[y] = x;
    return true;
  }
  bool same(int x, int y) { return root(x) == root(y);}
  int size(int x) { return -d[root(x)];}
};
mint f2(int n) {if (n == 0) return 1;mint x = f2(n/2);x *= x;if (n%2 == 1) x *= 2;return x;}
mint choose(int n,int a){mint x=1,y=1;rep(i,a){x*=n-i;y*=i+1;}return x/y;}

int main(){
  mint ans=1;
  ll a,b,c;
  cin>>a>>b>>c;
  ans*=a*(a+1)/2;
  ans*=b*(b+1)/2;
  ans*=c*(c+1)/2;
  cout<<ans<<endl;
  return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    string s;
    cin>>s;
    int q;
    cin>>q;
    int cnt=0;
    while(q--)
    {
        int t,a,b;
        cin>>t>>a>>b;
        if(t==2)
        {
            cnt++;
        }
        else
        {
            if(cnt%2==1)
            {
                 if(a<=n)
                {
                    a=a+n;
                }
                 else
                {
                   a=a-n;
                }
                if(b<=n)
                {
                    b=b+n;
                }
                 else
                {
                   b=b-n;
                }
            }
            swap(s[a-1],s[b-1]);

        }
    }
    if(cnt%2)
    {
        for(int i=n;i<2*n;i++)
        {
            cout<<s[i];
        }
        for(int i=0;i<n;i++)
        {
            cout<<s[i];
        }
    }
    else
    {
        cout<<s;
    }
}


#include "bits/stdc++.h"
// #pragma GCC optimize("O3,unroll-loops")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,mmx,avx,avx2")
using namespace std;
using ll = long long;

void A()
{
    string s; cin >> s;
    if (s[0] == s[1] && s[1] == s[2]) cout << "Won\n";
    else cout << "Lost\n";
}

void B()
{
    int n, limit; cin >> n >> limit;
    limit *= 100;
    for (int i = 1; i <= n; ++i) {
        int vol, percent; cin >> vol >> percent;
        limit -= vol*percent;
        if (limit < 0) {cout << i; return;}
    }
    cout << -1;
}

void C()
{
    int n; cin >> n;
    int a[n];
    ll ans = 0;
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
        int mn = a[i];
        for (int j = i; j >= 0; --j) {
            if (a[j] < mn) mn = a[j];
            ans = max(ans, 1LL*mn*(i-j+1));
        }
    }
    cout << ans;
}

void D()
{
    int n; cin >> n;
    vector<string> v(n);
    vector<array<ll, 2>> dp(n+1);
    dp[0][0] = dp[0][1] = 1;
    for (int i = 1; i <= n; ++i) {
        cin >> v[i-1];
        if (v[i-1] == "OR") {
            dp[i][1] = dp[i-1][0] + 2*dp[i-1][1];
            dp[i][0] = dp[i-1][0];
        }
        else {
            dp[i][1] = dp[i-1][1];
            dp[i][0] = dp[i-1][1] + 2*dp[i-1][0];
        }
    }
    cout << dp[n][1];
}

void E()
{
    int n; cin >> n;
    vector<array<ll, 2>> pts(n);
    for (auto &[x, y] : pts)
        cin >> x >> y;
    int m; cin >> m;
    using row = array<ll, 3>;
    using matrix = array<row, 3>;
    vector<matrix> mat(m+1);
    mat[0][0][0] = mat[0][1][1] = mat[0][2][2] = 1;
    auto matmul = [&] (auto &a, auto &b) {
        array<array<ll, 3>, 3> res = array<array<ll, 3>, 3>();
        for (int i = 0; i < 3; ++i)
            for (int j = 0; j < 3; ++j)
                for (int k = 0; k < 3; ++k)
                    res[i][j] += a[i][k] * b[k][j];
        return res;
    };
    for (int i = 1; i <= m; ++i) {
        int type; cin >> type;
        if (type == 1) {
            mat[i] = matrix{row{0, 1, 0}, row{-1, 0, 0}, row{0, 0, 1}};
        }
        else if (type == 2) {
            mat[i] = matrix{row{0, -1, 0}, row{1, 0, 0}, row{0, 0, 1}};
        }
        else {
            int p; cin >> p;
            if (type == 3) {
                mat[i] = matrix{row{-1, 0, 2*p}, row{0, 1, 0}, row{0, 0, 1}};
            }
            else {
                mat[i] = matrix{row{1, 0, 0}, row{0, -1, 2*p}, row{0, 0, 1}};
            }
        }
        mat[i] = matmul(mat[i], mat[i-1]);
    }

    int q; cin >> q;
    while (q--) {
        int a, b; cin >> a >> b;
        auto [x, y] = pts[b-1];
        auto transform = mat[a];
        cout << x*transform[0][0] + y*transform[0][1] + transform[0][2] << ' ' << x*transform[1][0] + y*transform[1][1] + transform[1][2] << '\n';
    }
}

int main()
{
    ios::sync_with_stdio(0); cin.tie(0);
    mt19937_64 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
    E();
}


#include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <bitset>
#include <climits>
#include <string>
#include <cmath>
#include <bitset>
#include <complex>
#include <functional>
#include <ctime>
#include <cassert>
#include <fstream>
#include <stack>
#include <random>
#include <iomanip>

#include <fstream>

using namespace std;
typedef long long ll;
typedef long double dd;
#define i_7 (ll)(1E9+7)
//#define i_7 998244353
#define i_5 i_7-2
ll mod(ll a){
    ll c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
typedef pair<ll,ll> l_l;
ll inf=(ll)1E18;
#define rep(i,l,r) for(ll i=l;i<=r;i++)
#define pb push_back
ll max(ll a,ll b){if(a<b)return b;else return a;}
ll min(ll a,ll b){if(a>b)return b;else return a;}
dd EPS=1E-9;
#define endl "\n"
#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);

int main(){fastio
    ll n;cin>>n;
    dd dp[n+1];
    dp[n]=0.0;
    for(ll i=n-1;i>=1;i--){
        dp[i]=(dd)n/(n-i)+dp[i+1];
    }
    cout<<setprecision(20)<<dp[1]<<endl;

    return 0;

}

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

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

    double a = 0.0;
    for (int i = 1; i < N; i++) {
        a += (1.0 / (double)i);
    }
    double ans = a * (double)N;
    cout << fixed << setprecision(10) << ans << endl;
}


/*
#pragma GCC optimize("Ofast")
#pragma GCC target("avx", "avx2", "fma")
#pragma GCC optimization("unroll-loops")
*/
#include <bits/stdc++.h>
using namespace std;
#define pi acos(-1)
#define IOS ios_base::sync_with_stdio(0); cin.tie(); cout.tie();
#define fi first
#define se second
#define pf push_front
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define debug(x) cerr<<#x<<": "<<(x)<<'\n'
#define lb lower_bound
#define ub upper_bound
typedef long double ld;
typedef long long ll;
typedef unsigned long long ull;
const ll mod = 1e9+7;
const ll inf = 0x3f3f3f3f;
const ll llinf = 1e18;
const ll nax = 0;

int main(){
	IOS
	int n; cin >> n;
	vector<pair<int, int>>arr(n+5);
	for(int i=0;i<n;++i){
		cin >> arr[i].fi >> arr[i].se;
	}
	for(int i=0;i<n;++i){
		for(int j=0;j<n;++j){
			for(int k=0;k<n;++k){
				if(i==j || i==k || j==k) continue;
				int x1=arr[i].fi, x2=arr[j].fi, x3=arr[k].fi, y1=arr[i].se, y2=arr[j].se, y3=arr[k].se;
				ll satu=(x3-x1)*(y2-y1);
				ll dua=(y3-y1)*(x2-x1);
				if(satu==dua){
					cout << "Yes" << '\n';
					return 0;
				}
			}
		}
	}
	cout << "No" << '\n';
}

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i< (n); i++)
using ll = long long;
using P = pair<int, int>;
using Graph = vector<vector<int>>;
template<class T> void chmax(T& a, T b){
    if(a < b){
        a = b;
    }
}
template<class T> void chmin(T& a, T b){
    if(a > b){
        a = b;
    }
}
int main()
{
    int n;
    cin >> n;
    vector<double>x(n);
    vector<double>y(n);

    rep(i,n)cin >> x[i] >> y[i];

    rep(i,n){
        rep(j,n){
            rep(k,n){
                if(i == j)continue;
                if(j == k)continue;
                if(i == k)continue;

                double a1 = (y[i] - y[j])/(x[i] - x[j]);
                double a2 = (y[j] - y[k])/(x[j] - x[k]);

                if(a1 == a2){
                    cout << "Yes" << endl;
                    return 0;
                }

            }
        }
    }

    cout << "No" << endl;
    return 0;
}


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

int main() {
    int n;
    string s, t;
    cin >> n >> s >> t;

    vector<int> s0, t0;
    for (int i = 0; i < n; i++) {
        if (s[i] == '0') {
            s0.push_back(i);
        }
        if (t[i] == '0') {
            t0.push_back(i);
        }
    }

    if (s0.size() != t0.size()) {
        cout << -1 << endl;
        return 0;
    }

    int ans = 0;

    for (int i = 0; i < s0.size(); i++) {
        if (s0[i] != t0[i]) {
            ans++;
        }
    }

    cout << ans << endl;
}

    #include<bits/stdc++.h>
    using namespace std;
    #define endl "\n"
    #define mp make_pair
    #define ll long long

int gcd(int a,int b){
    if(b==0)
        return a;

    int hcf=gcd(b,a%b);

    return hcf;
}
int main(){

    ios_base::sync_with_stdio(false);cin.tie(NULL);
   /* // for getting input from input.txt
    freopen("input.txt", "r", stdin);
    // for writing output to output.txt
    freopen("output.txt", "w", stdout);
    */
    int a,b,c;
    cin>>a>>b>>c;
    if(a==b)
        cout<<c<<endl;
    else if(a==c)
        cout<<b<<endl;
    else if(b==c)
        cout<<a<<endl;
    else
        cout<<0<<endl;
}


#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
using namespace std;
typedef long long ll;
int main(){
    int i,n; cin >> n;
    ll s = 0;
    vector<ll> v;
    for(i=0;i<n;i++){
        ll a,b; cin >> a >> b;
        s -= a;
        v.push_back(2*a + b);
    }
    sort(v.rbegin(),v.rend());
    for(i=0;i<n;i++){
        s += v[i];
        if(s>0){
            cout << i + 1 << endl;
            return 0;
        }
    }
}

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

int main(){
    ll N;
    cin >> N;
    vector<ll> A(N),B(N),get(N);
    ll a = 0,b = 0;
    rep(i,N){
        cin >> A[i] >> B[i];
        a += A[i];
        b += B[i];
        get[i] = A[i]*2 + B[i];
    }
    ll sub = a;
    sort(get.begin(),get.end());
    ll ans = 0;
    while(sub >= 0){
        sub -= get[N-ans-1];
        ans++;
    }
    cout << ans << endl;
}


#include <bits/stdc++.h>

#define int long long

using namespace std;

const int maxn = 5005;
const int mod = 998244353;
int h, w, k;
char grid[maxn][maxn];
int dp[maxn][maxn], d[maxn][maxn], r[maxn][maxn], p[maxn];

int recur(int i, int j) {
    if (dp[i][j] != -1) return dp[i][j];
    if (i == h && j == w) {
        if (grid[i][j] == '.') return 3;
        else return 1;
    }
    int res = 0;
    // move down
    if (grid[i][j] != 'R' && i != h) {
        int ways = p[(w-j)-r[i][j+1]];
        if (grid[i][j] == '.') ways = (ways*2)%mod;
        res += (recur(i+1,j)*ways)%mod;
        res %= mod;
    }
    // move right
    if (grid[i][j] != 'D' && j != w) {
        int ways = p[3,(h-i)-d[i+1][j]];
        if (grid[i][j] == '.') ways = (ways*2)%mod;
        res += (recur(i,j+1)*ways)%mod;
        res %= mod;
    }
    dp[i][j] = res;
    return res;
}

signed main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    p[0] = 1;
    for (int i = 1; i < maxn; i++) p[i] = (p[i-1]*3)%mod;
    for (int i = 0; i < maxn; i++) for (int j = 0; j < maxn; j++) {
        grid[i][j] = '.';
        dp[i][j] = -1;
        d[i][j] = r[i][j] = 0;
    }
    cin >> h >> w >> k;
    for (int i = 0; i < k; i++) {
        int x, y;
        char c;
        cin >> x >> y >> c;
        grid[x][y] = c;
        d[x][y]++;
        r[x][y]++;
    }
    for (int i = 0; i < maxn; i++) {
        for (int j = maxn-2; j >= 0; j--) {
            d[j][i] += d[j+1][i];
            r[i][j] += r[i][j+1];
        }
    }
    int res = recur(1,1);
    cout << res << '\n';
}
/*

 */

#pragma GCC target("avx2")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#include<stdio.h>
#include<vector>
#include<algorithm>
constexpr unsigned long long MOD = 998244353;
constexpr unsigned long long IM = 18479187003;
constexpr unsigned long long MOD32 = 665496236;

    unsigned long long dp[5001];
int main(){
    int H=0, W=0, K=0;
    char c=getchar_unlocked();
    while(c<='9'&&c>='0') {H=(H<<1)+(H<<3)+c-'0'; c=getchar_unlocked();}
    c=getchar_unlocked();
    while(c<='9'&&c>='0') {W=(W<<1)+(W<<3)+c-'0'; c=getchar_unlocked();}
    c=getchar_unlocked();
    while(c<='9'&&c>='0') {K=(K<<1)+(K<<3)+c-'0'; c=getchar_unlocked();}
    std::vector<std::vector<std::pair<int, char>>> f(H);
    unsigned long long y = H * W - K;
    while(--K>=0){
        int h=0, w=0;
        c=getchar_unlocked();
        while(c<='9'&&c>='0') {h=(h<<1)+(h<<3)+c-'0'; c=getchar_unlocked();}
        c=getchar_unlocked();
        while(c<='9'&&c>='0') {w=(w<<1)+(w<<3)+c-'0'; c=getchar_unlocked();}
        --h; --w;
        f[h].emplace_back(w, getchar_unlocked());
        getchar_unlocked();
    }
    --H; --W;
    dp[0] = 1;
    for(int i = 0; i < H; ++i){
        std::sort(f[i].begin(), f[i].end());
        auto itr = f[i].begin();

        for (int j = 0; j <= W; ++j){
            if(itr != f[i].end() and itr->first == j){
                char c = itr->second;
                if(c != 'D') dp[j + 1] += dp[j];
                if(c == 'R') dp[j] = 0;
                ++itr;
            }
            else{
                {
        dp[j] *= MOD32;
#ifdef _MSC_VER
        unsigned long long x;
        _umul128(dp[j], IM, &x);
#else
        unsigned long long x =
            (unsigned long long)(((unsigned __int128)(dp[j])*IM) >> 64);
#endif
        dp[j] = dp[j] - x * MOD+MOD;
             }
                dp[j + 1] += dp[j];
            }
        }
    }

  {
        std::sort(f[H].begin(), f[H].end());
        auto itr = f[H].begin();
        for (int j = 0; j < W; ++j){
            if(itr != f[H].end() and itr->first == j){
                char c = itr->second;
                if(c != 'D') dp[j + 1] += dp[j];
                ++itr;
            }
            else{
                 {
        dp[j] *= MOD32;
#ifdef _MSC_VER
        unsigned long long x;
        _umul128(dp[j], IM, &x);
#else
        unsigned long long x =
            (unsigned long long)(((unsigned __int128)(dp[j])*IM) >> 64);
#endif
        dp[j] = dp[j] - x * MOD+MOD;
             }
                dp[j + 1] += dp[j];
            }
        }
  }

    unsigned long long x = 3;
    while(y) {
      if(y & 1) {
        dp[W] *= x;
#ifdef _MSC_VER
        unsigned long long x2;
        _umul128(dp[W], IM, &x2);
#else
        unsigned long long x2 =
            (unsigned long long)(((unsigned __int128)(dp[W])*IM) >> 64);
#endif
        dp[W] = dp[W] - x2 * MOD+MOD;
               }
      {
        x *= x;
#ifdef _MSC_VER
        unsigned long long x2;
        _umul128(x, IM, &x2);
#else
        unsigned long long x2 =
            (unsigned long long)(((unsigned __int128)(x)*IM) >> 64);
#endif
        x = x- x2 * MOD + MOD;}
      y >>= 1;
    }
    printf("%d", dp[W] % MOD);

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define dbg(x) cerr << #x << " = " << x << endl
#define rep(i, a, b) for(int i = (a); i <= (b); ++ i)
#define MP make_pair
#define pb push_back
#define fi first
#define se second
typedef long long LL;
typedef unsigned long long u64;
typedef unsigned int u32;
template <typename Tp> void read(Tp &x){
	x = 0; int op = 1; char ch = getchar();
	while(!isdigit(ch)){ if(ch == '-') op = -1; ch = getchar(); }
	while(isdigit(ch)){ x = x*10+ch-'0'; ch = getchar(); } x *= op;
}
template <typename Tp> void CMax(Tp &x, Tp y){ if(y > x) x = y; }
template <typename Tp> void CMin(Tp &x, Tp y){ if(y < x) x = y; }

int a, b, c, d;

int main()
{
	cin >> a >> b >> c >> d;
	if(b >= c * d) puts("-1");
	else {
		LL v = d * c - b;
		LL ans = ceil((double)a / (double)v);
		printf("%lld", ans);
	}
	return 0;
}

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

#define REP(i, n)       for(int i = 0; i < (n); i++)
#define REPS(i, a, b)   for(int i = (a); i <= (b); i++)
#define REPR(i, n)      for(int i = (n) - 1; i >= 0; i--)
#define REPRS(i, b, a)  for(int i = (b) ; i >= (a); i--)
#define ALL(x)          (x).begin(), (x).end()
#define ALLR(x)         (x).rbegin(), (x).rend()

constexpr static int MOD = 1e8 + 7;

inline void scan() {}

template <typename T, typename... U>
inline void scan(T&& t, U&&... u) {
  std::cin >> t;
  scan(std::forward<U>(u)...);
}

template <typename T>
inline void scanall(T t, int n) {
  for (int i = 0; i < n; i++) {
    std::cin >> t[i];
  }
}

template <typename T>
inline void scanall(T t, int n, int m) {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      std::cin >> t[i][j];
    }
  }
}

inline void print() {}

template <typename T, typename... U>
inline void print(T&& t, U&&... u) {
  std::cout << t;
  print(std::forward<U>(u)...);
}

inline void println() {
  std::cout << "\n";
}

template <typename T, typename... U>
inline void println(T&& t, U&&... u) {
  std::cout << t;
  println(std::forward<U>(u)...);
}

using graph = std::vector<std::vector<int>>;
using ll = long long;
using ull = unsigned long long;

int main() {
  double a, b, c, d;
  scan(a, b, c, d);

  ll ans;
  if (c * d - b > 0) {
    ans = static_cast<ll>(std::ceil(a / (c * d - b)));
  } else {
    ans = -1;
  }

  print(ans);

  return 0;
}


#include <cstdio>
#include <cstring>
#include <cmath>
#include <cassert>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <iostream>
#include <numeric>

/* debug macros */
#ifdef WAFDAYO
#define DBG_LINE() {std::cerr<<"\e[2m[L"<<__LINE__<<"]\e[m ";}
#define DBG_PRINT(s,t,u) {std::cerr<<(s)<<" \e[2m=\e[m \e[1m"<<(t)<<"\e[m"<<(u);}
#define SELECT_7TH(x1,x2,x3,x4,x5,x6,x7,...) x7
#define dbg1(x1) DBG_PRINT(#x1,x1,std::endl)
#define dbg2(x1,x2) DBG_PRINT(#x1,x1,", ")dbg1(x2)
#define dbg3(x1,x2,x3) DBG_PRINT(#x1,x1,", ")dbg2(x2,x3)
#define dbg4(x1,x2,x3,x4) DBG_PRINT(#x1,x1,", ")dbg3(x2,x3,x4)
#define dbg5(x1,x2,x3,x4,x5) DBG_PRINT(#x1,x1,", ")dbg4(x2,x3,x4,x5)
#define dbg6(x1,x2,x3,x4,x5,x6) DBG_PRINT(#x1,x1,", ")dbg5(x2,x3,x4,x5,x6)
#define dbg(...) DBG_LINE()\
SELECT_7TH(__VA_ARGS__,dbg6,dbg5,dbg4,dbg3,dbg2,dbg1)(__VA_ARGS__)
#else
#define dbg(...) {}
#endif

/* utility functions */
struct read_item{read_item(){};
template<class T>operator T(){T t;std::cin>>t;return t;}};
char splf(int i,int n){return(i+1<n)?' ':'\n';};
template<bool up>
struct _RI{int i;_RI(int a):i(a){}
int operator*(){return i;}void operator++(){i+=(up?1:-1);}
bool operator!=(const _RI& r){return up?i<r.i:i>=r.i;}};
template<bool up>
struct _RX{_RI<up> x,y;_RI<up> begin(){return x;}_RI<up> end(){return y;}
_RX(int a,int b):x(up?a:(a-1)),y(b){}_RX(int a):_RX(up?0:a,up?a:0){}};
typedef _RX<true> range;
typedef _RX<false> revrange;

/* types and constants */
typedef int64_t i64;
typedef uint64_t u64;
// const i64 inf = (i64)1.05e18;
// const int inf = (int)1.05e9;

using namespace std;

int modadd(int x, int y, int m) {
	int z = x + y;
	if(z >= m) {
		z = z - m;
	}
	return z;
}
int modsub(int x, int y, int m) {
	int z = x - y;
	if(z < 0) {
		z += m;
	}
	return z;
}

int main() {

	const int N = read_item();
	const int K = read_item();
	const int M = read_item();

	const int W = (N + 1) * N / 2 * K + 1;
	vector<int> ways((N + 1) * W);

	ways[0] = 1;

	for(int p : range(1, N + 1)) {

		int base = p * W;
		int ppp = p * (K + 1);
		int maxi = (1 + p) * p / 2 * K;

		for(int s : range(maxi + 1)) {
			auto& v = ways[base + s];
			v = ways[base + s - W];
			if(s >= p) {
				v = modadd(v, ways[base + (s - p)], M);
			}
		}
		for(int s : revrange( maxi + 1, 0)) {
			auto& v = ways[base + s];
			if(s >= ppp) {
				v = modsub(v, ways[base + (s - ppp)], M);
			}
		}
	}

	for(auto x : range(1, N + 1)) {

		int l = x - 1;
		int r = N - x;

		int lm = (1 + l) * l / 2 * K;
		int rm = (1 + r) * r / 2 * K;
		i64 v = 0;

		for(auto s : range(0, min(lm, rm) + 1)) {
			i64 vl = ways[l * W + s];
			i64 vr = ways[r * W + s];
			v = (v + vl * vr) % M;
		}

		i64 ans = ((v * (K + 1)) + (M - 1)) % M;

		printf("%lld\n", ans);
	}

	return 0;
}

/* wafdayo~~~ */

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

using ll=long long;
using vi=vector<int>;
using vvi=vector<vi>;
using vl=vector<ll>;
using vvl=vector<vl>;
using vpii=vector<pair<int,int>>;
using vpll=vector<pair<ll,ll>>;
using vs=vector<string>;
using vvc=vector<vector<char>>;

const int inf=1e9;
const ll INF=1e18;
const double eps=1e-10;
const double pi=acos(-1);
const ll mod=1e9+7;
const ll MOD=998244353;

//数学関連
int num_order(ll N){
  int res=0;

  while(N>0){
    N/=10;
    res++;
  }

  return res;
}
ll GCD(ll A,ll B){
  if(B==0) return A;
  else return GCD(B,A%B);
}
ll LCM(ll A,ll B){
  ll g=GCD(A,B);
  return A/g*B;
}
vpll prime_factorize(ll N){
  vpll res;

  for(ll i=2;i*i<=N;i++){
    if(N%i!=0) continue;

    ll ex=0;
    while(N%i==0){
      ex++;
      N/=i;
    }

    res.push_back({i,ex});
  }

  if(N!=1) res.push_back({N,1});

  return res;
}
ll 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;
  long long t = modpow(a, n / 2, p);
  return (t * t) % p;
}
ll small_nCk(ll n,ll k){
  ll res=1,fact=1;

  for(int i=0;i<k;i++){
    res=res*(n-i)/fact;
    fact++;
  }

  return res;
}

//データ構造
struct UnionFind {
    //自身が親であれば、その集合に属する頂点数に-1を掛けたもの
    //そうでなければ親のid
    vector<int> r;

    UnionFind(int N){
        r=vector<int>(N,-1);
    }

    int root(int x){
        if (r[x]<0) return x;
        return r[x]=root(r[x]);
    }

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

    int size(int x){
        return -r[root(x)];
    }
};
struct Egde{
  int to;
  ll W;
  Egde(int to,ll W) : to(to),W(W) {}
};

using Graph=vector<vector<Egde>>;

int main(){

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

  int ans;

  if(A+B>=15&&B>=8) ans=1;
  else if(A+B>=10&&B>=3) ans=2;
  else if(A+B>=3) ans=3;
  else ans=4;

  cout<<ans<<endl;
}


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

int main(){
    int V, T, S, D;
    cin >> V >> T >> S >> D;
    if (D >= V * T && D <= V * S) {
        cout << "No";
    } else {
        cout << "Yes";
    }
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

#define ull unsigned long long

void solve()
{
    vector<int> v(3);
    cin >> v[0] >> v[1] >> v[2];
    sort(v.begin(),v.end());
    if(v[2]-v[1] == v[1]-v[0])
        cout << "Yes" << endl;
    else
        cout << "No" << endl;
    return;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t = 1;
    //cin >> t;
    while(t--)
        solve();
    return 0;
}


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

int main(){
#ifndef ONLINE_JUDGE
	freopen("C:\\Users\\User\\Documents\\input.txt","r",stdin);
#endif
	int T;
	cin>>T;
	while(T--){
	    int n,x;
	    cin>>n;
	    map<int,int> mp;
	    for(int i=0;i<n;++i){
	         scanf("%d",&x);
	         mp[x]++;
	    }

	    if(n%2==1){
	    	printf("Second\n");
	    }
	    else{
	    	bool ok=0;
	    	for(auto it : mp){
	    		if(it.second%2==1){
	    			ok=1;
	    			break;
	    		}
	    	}
	    	printf("%s\n",ok ? "First" : "Second");
	    }

	}

	return 0;
}

#include <bits/stdc++.h>

// #include <atcoder/all>

using namespace std;
// using namespace atcoder;

#define DEBUG(x) cerr<<#x<<": "<<x<<endl;
#define DEBUG_VEC(v) cerr<<#v<<":";for(int i=0;i<v.size();i++) cerr<<" "<<v[i]; cerr<<endl;
#define DEBUG_MAT(v) cerr<<#v<<endl;for(int i=0;i<v.size();i++){for(int j=0;j<v[i].size();j++) {cerr<<v[i][j]<<" ";}cerr<<endl;}
typedef long long ll;
// #define int ll

#define vi vector<int>
#define vl vector<ll>
#define vii vector< vector<int> >
#define vll vector< vector<ll> >
#define vs vector<string>
#define pii pair<int,int>
#define pis pair<int,string>
#define psi pair<string,int>
#define pll pair<ll,ll>
template<class S, class T> pair<S, T> operator+(const pair<S, T> &s, const pair<S, T> &t) { return pair<S, T>(s.first + t.first, s.second + t.second); }
template<class S, class T> pair<S, T> operator-(const pair<S, T> &s, const pair<S, T> &t) { return pair<S, T>(s.first - t.first, s.second - t.second); }
template<class S, class T> ostream& operator<<(ostream& os, pair<S, T> p) { os << "(" << p.first << ", " << p.second << ")"; return os; }
#define X first
#define Y second
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define rrep1(i,n) for(int i=(int)(n);i>0;i--)
#define REP(i,a,b) for(int i=a;i<b;i++)
#define in(x, a, b) (a <= x && x < b)
#define all(c) c.begin(),c.end()
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a = b; return 1; } return 0; }
#define UNIQUE(v) v.erase(std::unique(v.begin(), v.end()), v.end());
const ll inf = 1000000001;
const ll INF = (ll)1e18 + 1;
const long double pi = 3.1415926535897932384626433832795028841971L;
#define Sp(p) cout<<setprecision(25)<< fixed<<p<<endl;
// int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
// int dx2[8] = { 1,1,0,-1,-1,-1,0,1 }, dy2[8] = { 0,1,1,1,0,-1,-1,-1 };
vi dx = {1, 0, -1, 0}, dy = {0, 1, 0, -1};
// vi dx2 = { 1,1,0,-1,-1,-1,0,1 }, dy2 = { 0,1,1,1,0,-1,-1,-1 };
#define fio() cin.tie(0); ios::sync_with_stdio(false);
const ll MOD = 1000000007;
// const ll MOD = 998244353;
// #define mp make_pair
//#define endl '\n'

void solve() {
    int n;
    cin >> n;
    vl a(n);
    rep (i, n) cin >> a[i];
    sort(all(a));
    if (n % 2 == 0) {
        for (int i = 0; i < n; i += 2) {
            if (a[i] != a[i + 1]) {
                cout << "First" << endl;
                return;
            }
        }
        cout << "Second" << endl;
    }
    else {
        cout << "Second" << endl;
    }
}

signed main() {
    fio();

    int t;
    cin >> t;
    while (t--) {
        solve();
    }
}


#include<bits/stdc++.h>
using namespace std;
#define SPEED ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define READ freopen("out.txt","r",stdin)
#define WRITE freopen("out.txt","w",stdout);
#define pb push_back
#define mem(arr,val) memset(arr,val,sizeof(arr))
#define sf(x) scanf("%d",&x)
#define sf2(x,y) scanf("%d %d",&x,&y)
#define sf3(x,y,z) scanf("%d %d %d",&x,&y,&z)
#define sl(x) scanf("%lld",&x)
#define sl2(x,y) scanf("%lld %lld",&x,&y)
#define sl3(x,y,z) scanf("%lld %lld %lld",&x,&y,&z)
#define sd(x) scanf("%lf",&x);
#define pii pair<int,int>
#define pLL pair<long long,long long>
#define pDB pair<double,double>
#define ff first
#define sn second
#define PRINT_CASE  printf("Case %d: ",tc++)
#define PRINT_CASENL  printf("Case %d:\n",tc++)
#define lnd tree[ind<<1]
#define rnd tree[(ind<<1)+1]
#define cnd tree[ind]
#define lndp b,(b+e)>>1,(ind<<1)
#define rndp ((b+e)>>1)+1,e,(ind<<1)+1
#define IN(a,x,y) (a>=x && a<=y)
#define popcountL __builtin_popcountll
#define popcount __builtin_popcount
/// int other=mask^((1<<n)-1);
typedef long long ll;
typedef long long int lln;
typedef unsigned long long int ull;
ll INF=1<<28;
//typedef long long lld;
const double pi=acos(-1.0);
int fx[]={1,-1,0,0}; //direction array
int fy[]={0,0,1,-1};
int dir[4][2]={1,0,-1,0,0,-1,0,1};
int knight[8][2]={1,2,1,-2,2,1,2,-1,-1,2,-1,-2,-2,1,-2,-1};
const long double EPS=1e-7;
//#define INF 10000

ll lcm(ll a,ll b)
{
    return a/__gcd(a,b)*b;
}
//struct compare
//{
//  bool operator()(const int& l, const int& r)
//  {
//      return l>r;
//  }
//};

const int mx=201050;
const int mod=998244353;
//const int mod=1e9+7;
// Including Policy Based DS
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//
//////cout<<*X.find_by_order(1)<<endl;
////cout<<X.order_of_key(-5)<<endl;
int vis[mx];
int color[mx];
vector<pii>G[mx];
void dfs(int node,int last,int bosanolagbe)
{
    vis[node]=1;
    int bosanohoise=-1;
    if(bosanolagbe!=0)
    {
        color[node]=bosanolagbe;
        bosanohoise=bosanolagbe;
    }
    set<int>st;
    st.insert(last);
    st.insert(0);
    for(auto x:G[node])
    {
        if(!vis[x.ff])
        {
            if(bosanohoise==-1)
            {
                if(x.sn!=last)
                {
                    color[node]=x.sn;
                    bosanohoise=x.sn;
                    dfs(x.ff,x.sn,0);
                }
                else
                {
                    st.insert(x.sn);
                    dfs(x.ff,0,x.sn);
                }
            }
            else
            {
                if(x.sn==bosanohoise)
                {
                    dfs(x.ff,x.sn,0);
                }
                else
                {
                    dfs(x.ff,bosanohoise,x.sn);
                }

            }
        }
    }
    if(bosanohoise==-1)
    {
        int c=1;
        while(st.find(c)!=st.end())
        {
            c++;
        }
        color[node]=c;
    }
}
int main()
{
//    SPEED;

    int t=1;
//    sf(t);
    while(t--)
    {
        int n,m;
        sf2(n,m);
        int x,y,z;
        for(int i=0;i<m;i++)
        {
            sf3(x,y,z);
            G[x].pb({y,z});
            G[y].pb({x,z});
        }
        dfs(1,0,0);

        for(int i=1;i<=n;i++)
        {
            if(color[i]==0)
            {
                cout<<"No"<<endl;
//                return 0;
            }
        }
        for(int i=1;i<=n;i++)
        {
            printf("%d\n",color[i]);
        }
    }
    return 0;
}

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

#define REP(i,m,n) for(int i=(m); i<(int)(n); i++)
#define RREP(i,m,n) for(int i=(int)((n)-1); i>=m; i--)
#define rep(i,n) REP(i,0,n)
#define rrep(i,n) RREP(i,0,n)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define fi first
#define se second
#define debug(...) {cerr<<"[L"<<__LINE__<<"] "; _debug(__VA_ARGS__);}

template<typename T>
string join(const vector<T>&v, string del=", "){ stringstream s;
    for(auto x : v) s << del << x; return s.str().substr(del.size());
}
template<typename T>
ostream& operator<<(ostream& o, const vector<T>&v){
    if(v.size()) o << "[" << join(v) << "]"; return o;
}
template<typename T>
ostream& operator<<(ostream& o, const vector<vector<T> >&vv){
    int l = vv.size();
    if(l){ o<<endl; rep(i,l) o << (i==0 ? "[ " : ",\n  " ) << vv[i] << (i==l-1 ? " ]" : ""); }
    return o;
}
template<typename T1, typename T2>
ostream& operator<<(ostream& o, const pair<T1, T2>& p){
    return o << "(" << p.first << ", " << p.second << ")";
}
inline void _debug(){cerr<<endl;}
template<class First, class... Rest>
void _debug(const First& first, const Rest&... rest){cerr<<first<<" ";_debug(rest...);}

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef vector<vl> vvl;

const double PI = (1*acos(0.0));
const double EPS = 1e-9;
const int INF = 0x3f3f3f3f;
const ll INFL = 0x3f3f3f3f3f3f3f3fLL;
const ll mod = 1e9 + 7;

inline void finput(string filename) {
    freopen(filename.c_str(), "r", stdin);
}

int di[] = {0,0,1,-1};
int dj[] = {1,-1,0,0};

int h,w;
vvi d;
vector<string> g;
vector<pii> ts[26];
void bfs(pii s){
    priority_queue<pair<int,pii>, vector<pair<int,pii>>, greater<pair<int,pii>>> Q;
    Q.emplace(0,s);
    d[s.fi][s.se] = 0;
    while(!Q.empty()){
        pair<int,pii> p = Q.top(); Q.pop();
        int i = p.se.fi;
        int j = p.se.se;
        char c = g[i][j] - 'a';
        if(0 <= c && c <= 26 && ts[c].size() > 0){
            for(auto t : ts[c]){
                int ti = t.fi;
                int tj = t.se;
                if(d[ti][tj] > d[i][j] + 1){
                    d[ti][tj] = d[i][j] + 1;
                    Q.emplace(d[ti][tj],pii(ti,tj));
                }
            }
            while(ts[c].size() > 0) ts[c].pop_back();
        }
        rep(k,4){
            int ni = i + di[k];
            int nj = j + dj[k];
            if(ni < 0 || h <= ni) continue;
            if(nj < 0 || w <= nj) continue;
            if(g[ni][nj] == '#') continue;
            if(d[ni][nj] > d[i][j] + 1){
                d[ni][nj] = d[i][j] + 1;
                Q.emplace(d[ni][nj],pii(ni,nj));
            }
        }
    }
}

int main(){
    ios_base::sync_with_stdio(0);
    // finput("./input");
    cin >> h >> w;
    g = vector<string>(h);
    d = vvi(h,vi(w, INF));
    pii start,goal;
    rep(i,h){
        cin >> g[i];
        rep(j,w){
            char c = g[i][j];
            if('a' <= c && c <= 'z'){
                ts[c-'a'].emplace_back(i,j);
            }
            if(c == 'S') start = pii(i,j);
            if(c == 'G') goal = pii(i,j);
        }
    }
    bfs(start);
    if(d[goal.fi][goal.se] == INF) cout << -1 << endl;
    else cout << d[goal.fi][goal.se] << endl;
    return 0;
}


// Problem: A - kcal
// Contest: AtCoder - AtCoder Beginner Contest 205
// URL: https://atcoder.jp/contests/abc205/tasks/abc205_a
// Memory Limit: 1024 MB
// Time Limit: 2000 ms
//
// Powered by CP Editor (https://cpeditor.org)

#include<bits/stdc++.h>
using namespace std ;
typedef long long ll ;
#define int ll
#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define mod 1000000007
#define N 200010

signed main( )
{
    fast
    int testcases = 1 ;
    // cin >> testcases ;
    while( testcases -- )
    {
        float a,b ;
        cin >> a>>b ;
        float c=100;
        float r = b/c;

        float ans = r*a;

        cout<<ans<<endl;

    }
    return 0 ;
}

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

int cnt[200005];

int main()
{
  int a,b;
  cin>>a>>b;

  for(int i=a;i<=b;i++)
  {
    for(int j=1;j*j<=i;j++)
    {
      if(i%j==0)
      {
        //j, i/j
        cnt[j]++;
        if(j*j!=i) cnt[i/j]++;
      }
    }
  }

  for(int i=200000;i>=1;i--)
  {
    if(cnt[i]>1)
    {
      cout<<i;
      return 0;
    }
  }
}


 //----AUTHOR:kkdrummer----/
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
//#include <boost/multiprecision/cpp_int.hpp>
//using namespace boost::multiprecision;
using namespace __gnu_pbds;
using namespace std;
typedef    long long                	 ll;
typedef    long double              	 ld;
typedef    unordered_set<ll>         	 usll;
typedef    unordered_multiset<ll>    	 umsll;
typedef    multiset<ll>              	 msll;
typedef    set<ll>                  	 sll;
typedef    vector<ll>               	 vll;
typedef    pair<ll,ll>              	 pll;
typedef    vector<pll>              	 vpll;
typedef    priority_queue<ll>       	 pqll;
typedef    vector<int>              	 vi;
typedef    set<int>                 	 si;
typedef    multiset<int>            	 msi;
typedef    unordered_multiset<int>  	 umsi;
typedef    unordered_set<int>       	 usi;
typedef    pair<int,int>               	 pi;
typedef    vector<pi>                	 vpi;
typedef    priority_queue<int>       	 pqi;
typedef    tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>   ind_si;
typedef    tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update>   ind_sll;
typedef    tree<int,null_type,less_equal<int>,rb_tree_tag,tree_order_statistics_node_update>   ind_msi;
typedef    tree<ll,null_type,less_equal<ll>,rb_tree_tag,tree_order_statistics_node_update>   ind_msll;
#define    in          		insert
#define    fi          		first
#define    se          		second
#define    pb   	    	push_back
#define    mp   	   		make_pair
#define    be   	   		begin
#define    en   	   		end
#define    itr  	   		iterator
#define    io  	       		ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define    mo   	   		1000000007
#define    inf  	   		8222372026854775807
#define    ninf   	   		-inf
#define    ima   	   		1147483647
#define    imi   	   		-ima
#define    oncnt       		__builtin_popcount
#define    zerobegin   		__builtin_clz
#define    zeroend    		__builtin_ctz
#define    parity      		__builtin_parity
#define    all(x)      		x.be(),x.en()
#define    eps         		1e-9
#define    coutd       		cout<<setprecision(10)<<fixed
#define    mems(dp,x)  		memset(dp,x,sizeof(dp))
#define    fbo         		find_by_order
#define    ook    	   		order_of_key
#define    upb    	   		upper_bound
#define    lowb  	   		lower_bound
#define    lte(v,x)    		(upb(all(v),x)-v.be())
#define    gte(v,x)    		(v.end()-lowb(all(v),x))
#define    gt(v,x)     		(v.en()-upb(all(v),x))
#define    lt(v,x)     		(lowb(all(v),x)-v.be())
const      ld PI= 			3.1415926535897932384626433832792884197169399375105820974944;
inline ll modpow(ll x,ll n){if(n==0)return 1;if(x==0)return 0;if(n==1)return(x%mo);ll u=(modpow(x,n/2));u=(u*u)%mo;if(n%2!=0)u=(u*x%mo)%mo;return u;}
inline ll modinv(ll x){return modpow(x,mo-2);}
inline ll mmul(ll a,ll b){if(a>=mo)a=a%mo;if(b>=mo)b=b%mo;if(a*b>=mo)return(a*b)%mo;return(a*b);}
inline ll madd(ll a, ll b){if(a>=mo)a=a%mo;if(b>=mo)b=b%mo;if(a+b>=mo)return(a+b)%mo;return(a+b);}
inline ll msub(ll a, ll b){if(a>=mo)a=a%mo;if(b>=mo)b=b%mo;return(((a-b)%mo+mo)%mo);}
inline ll mdiv(ll a,ll bb){if(a>=mo)a=a%mo;ll b=modinv(bb);if(b>=mo)b=b%mo;if(a*b>=mo)return(a*b)%mo;return(a*b);}
inline ll gcd(ll a,ll b){return __gcd(a,b);}
inline ll lcm(ll a,ll b){return (a*b)/gcd(a,b);}

int main()
{               io
int testcases=1;            //           cin>>testcases;
while(testcases--)
{

int n;
cin>>n;
usi s;
int a[n];
for(int i=0;i<n;i++)cin>>a[i];

int k=0;
for(int i=0;i<n;i++)
{	s.in(a[i]);
	while(s.find(k)!=s.en())
	k++;
	cout<<k<<"\n";

}

}return 0;}

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pi pair<int,int>
#define pll pair<ll,ll>
#define ld  long double

const int INF = 1e9 + 7;

void solve(){
	set<int> possible;
	ll B , C;
	cin >> B >> C;
	if(C == 1){
		if(B == 0) cout << 1 << endl;
		else cout << 2 << endl;
		return;
	}
	ll l1 , r1 , l2 , r2;
	l1 = (-B - C / 2) + (1 - C % 2);
	r1 = (-B + C / 2) - (1 - C % 2);
	l2 = (B - C / 2);
	r2 = (B + C / 2 - 1);
	if(l2 < l1){
		swap(l1 , l2);
		swap(r1 , r2);
	}
	// cout << "(" << l1 << ", " << r1 << ") " << endl;
	// cout << "(" << l2 << ", " << r2 << ") " << endl;

	if(l2 > r1) cout << ((r2 - l2 + 1) + (r1 - l1 + 1)) << endl;
	else{
		ll l = min(l1 , l2);
		ll r = max(r1 , r2);
		cout << (r - l + 1) << endl;
	}
}

int main(){
    ios :: sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int tt = 1;

    for(int tc = 1; tc <= tt; tc++){
        // cout << "Case #" << tc << ": ";
        solve();
    }
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(ll i = 0, i##_len = (n); i < i##_len; i++)
#define reps(i, s, n) for(ll i = (s), i##_len = (n); i < i##_len; i++)
#define rrep(i, n) for(ll i = (n) - 1; i >= 0; i--)
#define rreps(i, e, n) for(ll i = (n) - 1; i >= (e); i--)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) ((ll)(x).size())
#define len(x) ((ll)(x).length())
#define endl "\n"
template<class T> void chmax(T &a, const T b){ a = max(a, b); }
template<class T> void chmin(T &a, const T b){ a = min(a, b); }
long long gcd(long long a, long long b) { return (a % b) ? gcd(b, a % b) : b; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    // ifstream in("input.txt");
    // cin.rdbuf(in.rdbuf());
    ll n;
    cin >> n;
    vector<ll> x(n), c(n);
    rep(i, n) cin >> x[i] >> c[i];
    map<ll, pair<ll, ll>> mc;
    rep(i, n) {
        if (mc.count(c[i]) == 0) {
            mc[c[i]] = make_pair(x[i], x[i]);
        }
        else {
            chmin(mc[c[i]].first, x[i]);
            chmax(mc[c[i]].second, x[i]);
        }
    }
    mc[n + 1] = make_pair(0, 0);
    map<ll, ll> dp;
    dp[0] = 0;
    for(auto &x : mc) {
        map<ll, ll> ndp;
        ll minv = x.second.first, maxv = x.second.second;
        for(auto &y : dp) {
            // max -> min
            {
                ll val = y.second + abs(y.first - maxv) + abs(maxv - minv);
                if (ndp.count(minv) == 0) {
                    ndp[minv] = val;
                }
                else {
                    chmin(ndp[minv], val);
                }
            }
            // min -> max
            {
                ll val = y.second + abs(y.first - minv) + abs(minv - maxv);
                if (ndp.count(maxv) == 0) {
                    ndp[maxv] = val;
                }
                else {
                    chmin(ndp[maxv], val);
                }
            }
        }
        dp = ndp;
    }
    ll ans = LONG_LONG_MAX;
    for(auto &x : dp) chmin(ans, x.second);
    cout << ans << endl;
    return 0;
}

#include <bits/stdc++.h>
#define pb push_back
typedef long long ll;
using namespace std;
const int N=2e5+5;
ll mn[N],mx[N];
int main()
{
    int n;
    cin>>n;
    for (int i=1;i<=n;++i)
        mn[i]=2e9,mx[i]=-2e9;
    for (int i=0;i<n;++i){
        ll x,c;
        cin >> x >> c;
        mn[c]=min(mn[c],x);
        mx[c]=max(mx[c],x);
    }
    ll dp[n + 1][2];
    dp[0][0]=dp[0][1]=0;
    bool first = true;
    ll res = 0;
    ll lmx = -1;
    ll lmn = -1;
    for (int i = 1; i <= n; ++i)
    {
        if (mn[i] == 2e9){
            dp[i][0] = dp[i - 1][0];
            dp[i][1] = dp[i - 1][1];
        }
        else
        {
            if (first)//第一次
            {
                dp[i][0]=mx[i]-mn[i]+abs(mx[i]);
                dp[i][1]=mx[i]-mn[i]+abs(mn[i]);
                first = false;
                lmx = mx[i];
                lmn = mn[i];
            }
            else
            {
                dp[i][0] = min(abs(lmx - mx[i]) + dp[i - 1][1], abs(lmn - mx[i]) + dp[i - 1][0]) + mx[i] - mn[i];
                dp[i][1] = min(abs(lmx - mn[i]) + dp[i - 1][1], abs(lmn - mn[i]) + dp[i - 1][0]) + mx[i] - mn[i];
                lmx = mx[i];
                lmn = mn[i];
            }
            res = min(dp[i][0] + abs(mn[i]), dp[i][1] + abs(mx[i]));
        }
    }
    cout << res << endl;
    system("pause");
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define int long long
const int nax=32,mod=1e9+7;
int mul(int x,int y)
{
    return x*y%mod;
}
int expo(int a,int b)
{
    int res=1;
    while(b)
    {
        if(b&1)
        res=mul(res,a);
        a=mul(a,a);
        b>>=1;
    }
    return res;
}
int32_t main()
{
    int tt=1;
    //cin>>tt;
    while(tt--)
    {
        int n,p,res=0;
        cin>>n>>p;
        res=mul(p-1,expo(p-2,n-1));
        cout<<res;
    }
    return 0;
}

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

int main() {
  long N, K;
  cin >> N >> K;
  for(int i = 0; i < K; i++){
    if(N % 200 == 0)
      N = N / 200;
    else
      N = N * 1000 + 200;
  }
  cout << N << endl;
}


#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define replr(i, l, r) for (int i = (l); i < (r); ++i)
const int mod = 1e9 + 7;
ll a, b, k;
ll ncr(ll n, ll r) {
    ll res = 1;
    rep(i, r) {
        res *= n - i;
        res /= (i + 1);
    }
    return res;
}

int main() {

    cin >> a >> b >> k;

    string ans = "";
    k--;
    while (a > 0 && b > 0) {
        ll x = ncr(a + b - 1, b);
        if (k < x) {
            ans += "a";
            a--;
        } else {
            ans += "b";
            b--;
            k -= x;
        }
    }
    rep(i, a) ans += "a";
    rep(i, b) ans += "b";
    cout << ans << endl;

    return 0;
}

/**
 *  author: souravrax
 *  created: 22.05.2021 17:50:47
**/
#include <bits/stdc++.h>
using namespace std;

#define all(x) begin(x), end(x)
#define len(x) int((x).size())
template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p) { return os << '(' << p.first << ", " << p.second << ')'; }
template<typename T_container, typename T = typename enable_if<!is_same<T_container, string>::value, typename T_container::value_type>::type>
ostream& operator<<(ostream &os, const T_container &v) { os << '{'; string sep; for (const T &x : v) os << sep << x, sep = ", "; return os << '}'; }
void dbg_out() { cerr << endl; }
template<typename Head, typename... Tail> void dbg_out(Head H, Tail... T) { cerr << ' ' << H; dbg_out(T...); }
#ifdef LOCAL
#define dbg(...) cerr << "[ " << #__VA_ARGS__ << " ]:", dbg_out(__VA_ARGS__)
#else
#define dbg(...) (void)0x30
#endif
using ll = long long;

ll memo[35][35];

ll dp(ll a, ll b) {
    if (a == 0 || b == 0) return memo[a][b] = 1;
    ll ans = memo[a][b];
    if (~ans) return ans;
    return memo[a][b] = dp(a - 1, b) + dp(a, b - 1);
}

int32_t main() {
    ios::sync_with_stdio(false), cin.tie(nullptr);
    ll a, b, k;
    cin >> a >> b >> k, k--;

    ll now = k;
    memset(memo, -1, sizeof memo);

    ll _a = a, _b = b;
    string ans;

    for (int i = 0; i < a + b; i++) {
        if (_a == 0) {
            ans.push_back('b');
            _b--;
            continue;
        }
        if (_b == 0) {
            ans.push_back('a');
            _a--;
            continue;
        }

        if (dp(_a - 1, _b) > now) {
            _a--;
            ans.push_back('a');
        } else {
            now -= dp(_a - 1, _b);
            _b--;
            ans.push_back('b');
        }
    }
    cout << ans << '\n';
}


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

int main(){
	int N, M, K, i, j;
	scanf("%d%d%d", &N, &M, &K);
	vector<int> is_hazure(N + 1, 0);
	for(i = 0; i < K; i++){
		int A;
		scanf("%d", &A);
		is_hazure[A] = 1;
	}
	int now = 0;
	for(i = 0; i <= N; i++){
		if(is_hazure[i] == 1){
			now++;
		}
		else{
			now = 0;
		}
		if(now >= M){
			printf("-1\n");
			return 0;
		}
	}
	vector<long double> x(N + 1), s(N + 1);
	long double l = 0, h, r = 1e11;
	for(i = 0; i < 200; i++){
		h = (l + r) / 2;
		x[N] = 0;
		s[N] = 0;
		for(j = N - 1; j >= 0; j--){
			if(is_hazure[j] == 1){
				x[j] = h;
			}
			else{
				x[j] = 1 + (s[j + 1] - s[min(N, j + M + 1)]) / M;
			}
			s[j] = s[j + 1] + x[j];
		}
/*		printf("h = %lf\n", h);
		printf("x:\n");
		for(j = 0; j <= N; j++){
			printf("%lf ", x[j]);
		}
		printf("\n");
		printf("s:\n");
		for(j = 0; j <= N; j++){
			printf("%lf ", s[j]);
		}
		printf("\n");
*/		if(x[0] > h){
			l = h;
		}
		else{
			r = h;
		}
	}
	printf("%.10Lf\n", l);
	return 0;
}

#include<bits/stdc++.h>

int main(){
    using namespace std;
    unsigned long N, M, K;
    cin >> N >> M >> K;
    const auto unavailable{[&N, &M, &K]{
        vector<unsigned long> unavailable(N + 1);
        vector<unsigned long> ban;
        for(unsigned long i{0}, a; i < K; ++i){
            cin >> a;
            unavailable[a] = 1;
            ban.push_back(a);
        }
        sort(begin(ban), end(ban));
        for(unsigned long i{M - 1}; i < K; ++i)if(ban[i - M + 1] + M - 1 == ban[i])exit(puts("-1") & 0);
        return unavailable;
    }()};
    const auto iteration{[&N, &M, &unavailable](long double x) -> long double {
        vector<long double> dp(N + 1);
        long double now{0}, c{0}, tmp{0}, y{0};
        for(unsigned long i{N}; i--; ){
            dp[i] = unavailable[i] ? x : now / M + 1;
            now += dp[i];
            now -= dp[min(N, i + M)];
        }
        return dp[0];
    }};
    constexpr long double eps{1e-10};
    cout << setprecision(15) << [&iteration]{
        auto [l, r]{[&iteration]{
            if(2 > iteration(2))return make_pair(1.0L, 2.0L);
            long double r{2};
            while(r * r < iteration(r * r))r *= r;
            return make_pair(r, r * r);
        }()};
        for(unsigned long i{0}; i < 20; ++i){
            long double m{sqrt(l) * sqrt(r)};
            (m < iteration(m) ? l : r) = m;
        }
        return l;
    }() << endl;
    return 0;
}


#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define ll long long
#define rep(i,n) for(ll i=0;i<(n);i++)
#define pll pair<ll,ll>
#define pii pair<int,int>
#define pq priority_queue
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
#define endl '\n'
#define ios ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define lb(c,x) distance(c.begin(),lower_bound(all(c),x))
#define ub(c,x) distance(c.begin(),upper_bound(all(c),x))

using namespace std;

inline int topbit(unsigned long long x){
	return x?63-__builtin_clzll(x):-1;
}

inline int popcount(unsigned long long x){
	return __builtin_popcountll(x);
}

inline int parity(unsigned long long x){//popcount%2
	return __builtin_parity(x);
}

template<class T> inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}
template<class T> inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}

const ll INF=1e9+7;

int main(){
    ll x;
    cin >> x;
    if(x<0) cout << 0 << endl;
    else cout << x << endl;
    return 0;
}

    #include <bits/stdc++.h>
    using namespace std;
    #include <math.h>
    #include <iomanip>
    #include <cstdint>
    #include <string>
    #include <sstream>
    template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
    template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
    #define rep(i,n) for (int i = 0; i < (n); ++i)
    typedef long long ll;
    using P=pair<ll,ll>;
    const int INF=1001001001;
    const int mod=1e9+7;

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


#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<utility>
using namespace std;

int N, ans, a[100006];
vector<pair<int, int>> s;
int main() {
	scanf("%d", &N);
	s.push_back(make_pair(0, 0));
	for (int i = 0; i < N; i++) {
		scanf("%d", &a[i]);
	}
	for (int i = 0; i <= N; i++) {
		if (a[i] > s.back().first) {
			s.push_back(make_pair(a[i], 1));
		} else if (a[i] == s.back().first) {
			s.back().second++;
		} else {
			while (s.back().first > a[i]) {
				pair<int, int> temp = s.back();
				s.pop_back();
				ans = max(ans, temp.first * temp.second);
				if (a[i] > s.back().first) {
					s.push_back(make_pair(a[i], temp.second + 1));
				} else if (a[i] == s.back().first) {
					s.back().second += temp.second + 1;
				} else {
					s.back().second += temp.second;
				}
			}
		}
	}
	printf("%d\n", ans);
	return 0;
}

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <stack>
using namespace std;
const int SIZE = 1e4 + 1;
struct range{
    int l, r;
}R[SIZE];
int a[SIZE], n;
stack<int> stk;
int main()
{
    cin >> n;
    for(int i = 0; i < n; i++){
        cin >> a[i];
    }
    for(int i = 0; i < n; i++){
        if (stk.empty() || a[i] >= a[stk.top()]){
            stk.push(i);
        }
        else{
            while (!stk.empty() && a[stk.top()] > a[i]){
                R[stk.top()].r = i - 1;
                stk.pop();
            }
            stk.push(i);
        }
    }
    while (!stk.empty()){
        R[stk.top()].r = n - 1;
        stk.pop();
    }
    //if (stk.empty()) cout << "empty" << endl;
    for(int i = n - 1; i >= 0; i--){
        if (stk.empty() || a[i] >= a[stk.top()]){
            stk.push(i);
        }else{
            while (!stk.empty() && a[stk.top()] > a[i]){
                R[stk.top()].l = i;
                stk.pop();
            }
            stk.push(i);
        }
    }
    while (!stk.empty()){
        //cout << stk.top() << endl;
        R[stk.top()].l = -1;
        stk.pop();
    }
    /*for(int i = 0; i < n; i++){
        printf("%d %d\n", R[i].l, R[i].r);
    }*/
    int ans = 0;
    for(int i =0 ; i < n; i++){
        ans = max(ans, (R[i].r - R[i].l) * a[i]);
    }
    for(int i = 0; i < n; i++){
        //printf("%d %d\n", R[i].l, R[i].r);
    }
    cout << ans << endl;
    return 0;

}


#include<bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i,m,n) for(int i=(m);i<(n);i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back
#define all(a) a.begin(),a.end()
#define rall(c) (c).rbegin(),(c).rend()
#define mp make_pair
#define endl '\n'
#define vec vector<ll>
#define mat vector<vector<ll> >
#define fi first
#define se second
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
typedef long double ld;
typedef complex<double> comp;
const ll INF=1e9+7;
const ll inf=INF*INF;
const ll MOD=1e9+7;
const ll mod=MOD;
const int MAX=200010;

signed main(){
    ll n;cin>>n;
    ll ans=0;
    rep(i,n){
        ll a;cin>>a;
        ll b;cin>>b;
        ans+=b*(b+1)/2;
        ans-=a*(a-1)/2;
    }
    cout<<ans<<endl;
}

#include<bits/stdc++.h>
using namespace std;
#define int long long int
//int arr[500000]
int make_tuple(int l,int r)
{ int y= r-2*l+1;
       if(y<0) return 0;
   return (y*(y+1))/2;
}
int find_ans()
{ int l,r,ans;
 cin>>l>>r;

 ans= make_tuple(l,r);
return ans;
}

int32_t main()
{

    int t;
cin>>t;
 while(t>0)
 { cout<<find_ans()<<"\n";
    t--;
 }
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

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

  if (A+B>=15 && B>=8) {
    cout << 1 << endl;
  }
  else if (A+B>=10 && B>=3) {
    cout << 2 << endl;
  }
  else if (A+B>=3) {
    cout <<3 <<endl;
  }
  else {
    cout << 4 << endl;
  }
}

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

int main(){
    int N, K;
    cin >> N >> K;
    int ans = 0;
    for (int i=1; i<=N; ++i){
        for (int j=1; j<=K; ++j){
            ans += stoi(to_string(i)+"0"+to_string(j));
        }
    }
    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 INF=0x3f3f3f3f;
const ll INFL=0x3f3f3f3f3f3f3f3f;
const int MOD=1000000007;

vector<int>E[300000];
ll sum[300000];
int par[300000];
int dep[300000];

void dfs1(int v,int p){
	par[v]=p;
	if(p!=-1)dep[v]=dep[p]+1;
	for(int u:E[v]){
		if(u==p)continue;
		dfs1(u,v);
	}
}
void dfs2(int v,int p){
	if(p!=-1){
		sum[v]+=sum[p];
	}
	for(int u:E[v]){
		if(u==p)continue;
		dfs2(u,v);
	}
}

int A[300000],B[300000];

int main(){
	int n;cin>>n;
	rep(i,n-1){
		int a,b;scanf("%d%d",&a,&b);a--;b--;
		E[a].push_back(b);
		E[b].push_back(a);
		A[i]=a;B[i]=b;
	}
	dfs1(0,-1);
	int q;cin>>q;
	rep(i,q){
		int t,e,x;scanf("%d%d%d",&t,&e,&x);e--;
		int a=A[e],b=B[e];
		if(dep[a]>dep[b]){
			swap(a,b);
			t=2-t+1;
		}
		if(t==1){
			sum[0]+=x;
			sum[b]-=x;
		}
		else{
			sum[b]+=x;
		}
	}
	dfs2(0,-1);
	rep(i,n){
		printf("%lld\n",sum[i]);
	}
}

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

const int N = 2e5+69;
int entry[N];
long long scores[N], toAdd[N], tot;
vector<int> tree[N];

void dfs(int c, int p) {
    scores[c] = scores[p] + toAdd[c];
    entry[c] = entry[p] + 1;
    for (int i : tree[c])
        if (i != p)
            dfs(i, c);
}

void query(int x, int y, int z) {
    if (entry[x] > entry[y])
        toAdd[x] += z;
    else {
        tot += z;
        toAdd[y] -= z;
    }
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int n, q, x, y, z;
    cin >> n;

    int a[n][2];
    for (int i = 1; i < n; ++i) {
        cin >> x >> y;
        a[i][0] = x, a[i][1] = y;
        tree[x].push_back(y);
        tree[y].push_back(x);
    }
    dfs(1, 0);
    cin >> q;
    while (q--) {
        cin >> x >> y >> z;
        if (x == 1)
            query(a[y][0], a[y][1], z);
        else
            query(a[y][1], a[y][0], z);
    }
    dfs(1, 0);
    for (int i = 1; i <= n; ++i)
        cout << scores[i] + tot << '\n';
}


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

int GCD(int a,int b){ return b?GCD(b,a%b):a; }

bool sieve[32768]={};
vector<int> P;

vector<pair<int,int>> factorize(int N){
  vector<pair<int,int>> res;
  for(int p:P){
    if(N%p) continue;
    if(N<p) break;
    res.push_back({p,0});
    while(N%p==0){ N/=p; res.back().second++; }
  }
  if(N!=1) res.push_back({N,1});
  return move(res);
}
vector<int> divs(vector<pair<int,int>> F){
  vector<int> res = {1};
  for(auto f:F){
    int t=res.size() * f.second;
    rep(i,t) res.push_back(res[i] * f.first);
  }
  return move(res);
}

int N;
int A[2000];
map<int,int> D;
int m;

int main(){
  cin>>N; rep(i,N) cin>>A[i];
  m=1000000000; rep(i,N) m=min(m,A[i]);
  for(int i=2; i<32768; i++) if(!sieve[i]){
    P.push_back(i);
    for(int j=i*i; j<32768; j+=i) sieve[j]=true;
  }
  rep(i,N){
    auto B=divs(factorize(A[i]));
    for(int d:B){
      int x=D[d];
      if(x==0) D[d]=A[i];
      else D[d]=GCD(x,A[i]);
    }
  }
  int ans=0;
  for(auto d:D) if(d.first==d.second) if(d.first<=m) ans++;
  cout<<ans<<endl;
  return 0;
}

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

#define ll long long
#define rep(i,a,b) for(int i=a;i<b;i++)
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define FORe(i,a,b) for(int i=a;i<=b;i++)
#define FORr(i,a,b) for(int i=a;i>b;i--)
#define FORre(i,a,b) for(int i=a;i>=b;i--)
#define pb push_back
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

template<class T> void sort_unique(vector<T> &v){
    sort(v.begin(),v.end());
    v.erase(unique(v.begin(),v.end()),v.end());
}

void solve(){
    int n;
    cin >> n;
    vector<int> a(n);
    rep(i,0,n) cin >> a[i];
    sort(a.begin(),a.end());

    vector<int> v;
    rep(i,0,n){
        for(int k = 1; k * k <= a[i]; k++){
            if(a[i]%k == 0){
                if(k<=a[0]) v.pb(k);
                if(a[i]/k <= a[0]) v.pb(a[i]/k);
            }
        }
    }
    sort_unique(v);

    ll ans = 0;

    int len = v.size();
    rep(i,0,len){
        int factor = v[i];
        int g = 0;
        rep(j,0,n) if(a[j]%factor == 0) g = __gcd(g,a[j]);
        if(g == factor) ans++;
    }
    cout << ans << endl;
}

int main(){
        ios::sync_with_stdio(0);
	    cin.tie(0);
        int t;
        t = 1;
        while(t--){
            solve();
        }
        return 0;
}


#include <bits/stdc++.h>
typedef long long ll;
typedef std::vector<int> vi;
typedef std::vector<std::vector<int>> vii;
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; }
#define rep(i, n) for(int i = 0; i < (int)(n); ++i)
#define repi(i, a, b) for(int i = a; i < (int)(b); ++i)
#define all(x) (x).begin(),(x).end()
#define SZ(x) ((int)(x).size())
#define inf 2147483647
#define inf64 9223372036854775807
#define Q queue
#define PQ priority_queue
#define pb push_back
#define mp make_pair
#define F first
#define S second
using namespace std;

const int MX = 1510;

int di[] = {-1, 0, 1, 0};
int dj[] = {0, 1, 0, -1};

bool ok[MX][MX] = {};
bool light[MX][MX] = {};
bool wall[MX][MX] = {};
bool visited[MX][MX] = {};
bool memo[MX][MX] = {};

bool search(int k, int i, int j, int h, int w) {
    if(i < 0 || j < 0 || i >=h || j >= w) return false;
    if(wall[i][j]) return false;
    if(light[i][j]) return true;
    if(visited[i][j]) return memo[i][j];

    visited[i][j] = true;
    return memo[i][j] = search(k, i+di[k], j+dj[k], h, w);
}

void solution()
{
    int h, w, n, m;
    cin >> h >> w >> n >> m;

    rep(i, n)
    {
        int a, b;
        cin >> a >> b;

        light[a-1][b-1] = true;
    }

    rep(i, m)
    {
        int a, b;
        cin >> a >> b;
        wall[a-1][b-1] = true;
    }

    rep(k, 4) {
        rep(i, h) rep(j, w) visited[i][j] = false;
        rep(i, h) rep(j, w) if( search(k, i, j, h, w)) ok[i][j] = true;
    }

    int ans = 0;
    rep(i, h) rep(j, w) if(ok[i][j]) ++ans;

    cout << ans << endl;
}

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

#define _USE_MATH_DEFINES
#include <iostream>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <algorithm>
#include <climits>
#include <cstring>
#include <cmath>
#include <stack>
#include <iomanip>
#include <tuple>
#include <functional>
#include <cfloat>
#include <map>
#include <set>
#include <array>
#include <stdio.h>
#include <string.h>
#include <random>
#include <cassert>
using ll = long long;
using ull = unsigned long long;
using uint = unsigned int;
using namespace std;
#define int long long
#define CONTAINS_VEC(v,n) (find((v).begin(), (v).end(), (n)) != (v).end())
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
#define ARY_SORT(a, size) sort((a), (a)+(size))
#define REMOVE(v,a) (v.erase(remove((v).begin(), (v).end(), (a)), (v).end()))
#define REVERSE(v) (reverse((v).begin(), (v).end()))
#define ARY_REVERSE(v,a) (reverse((v), (v)+(a)))
#define REP(i, n) for (int (i)=0; (i) < (n); (i)++)
#define REPE(i, n) for (int (i)=0; (i) <= (n); (i)++)
#define CONTAINS_MAP(m, a) ((m).find((a)) != m.end())
#define CONTAINS_SET(m, a) ((m).find((a)) != m.end())
void YesNo(bool b) { cout << (b ? "Yes" : "No") << endl; exit(0); }
void Yes() { cout << "Yes" << endl; exit(0); }
void No() { cout << "No" << endl; exit(0); }

int N, M;
int X[101];
vector<int>Y[20];
vector<int>Z[20];

int _dp[1000000];

int bit_count(ull v)
{
	ull count = (v & 0x5555555555555555ULL) + ((v >> 1ULL) & 0x5555555555555555ULL);
	count = (count & 0x3333333333333333ULL) + ((count >> 2ULL) & 0x3333333333333333ULL);
	count = (count & 0x0f0f0f0f0f0f0f0fULL) + ((count >> 4ULL) & 0x0f0f0f0f0f0f0f0fULL);
	count = (count & 0x00ff00ff00ff00ffULL) + ((count >> 8ULL) & 0x00ff00ff00ff00ffULL);
	count = (count & 0x0000ffff0000ffffULL) + ((count >> 16ULL) & 0x0000ffff0000ffffULL);
	return (int)((count & 0x00000000ffffffffULL) + ((count >> 32ULL) & 0x00000000ffffffffULL));
}

signed main()
{
	cin >> N >> M;
	//REP(i, M) cin >> X[i] >> Y[i] >> Z[i];
	REP(i, M)
	{
		int x, y, z;
		cin >> x >> y >> z;

		Y[x].push_back(y);
		Z[x].push_back(z);
	}

	int dp_max = (1LL << N);
	_dp[0] = 1;

	for (int i = 0; i < dp_max; i++)
	{
		int prev = _dp[i];

		for (int j = 0; j < N; j++)
		{
			int cur = (1LL << j);
			if ((i & cur) == 0)
			{
				int bitcnt = bit_count(i | cur);
				if (Y[bitcnt].size() == 0)
				{
					_dp[i | cur] += _dp[i];
				}
				else
				{
					bool is_valid = true;
					for (int k = 0; k < Y[bitcnt].size(); k++)
					{
						int y = Y[bitcnt][k];
						int z = Z[bitcnt][k];
						int mask = (1LL << y) - 1;
						int b = ((i | cur) & mask);
						int cnt = bit_count(b);
						if (cnt > z)
						{
							is_valid = false;
						}
					}
					if (is_valid)
					{
						_dp[i | cur] += _dp[i];
					}
				}
			}
			else
			{
			}
		}
	}

	cout << _dp[(1LL << N) - 1] << endl;
}


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

using ll = long long;
using str = string;

using pi = pair<int,int>;
using pl = pair<ll,ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vs = vector<str>;
using vpi = vector<pi>;
using vpl = vector<pl>;

#define sz(x) (int)(x).size()
#define all(x) begin(x), end(x)
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define lb lower_bound
#define ub upper_bound

constexpr int setbits(int x) { return __builtin_popcount(x); }
constexpr int bits(int x) { return 32-__builtin_clz(x); }
str binary(int x) { return bitset<32>(x).to_string(); }
int decimal(str x) { return stoi(x,nullptr,2); }
ll cdiv(ll a, ll b) { return a/b+((a^b)>0&&a%b); }
ll fdiv(ll a, ll b) { return a/b-((a^b)<0&&a%b); }

const int nax = INT_MAX;
const int nim = INT_MIN;
const int mod = 1000000007;

void solve(){
	ll n, m, t;
	cin >> n >> m >> t;
	vpi a(m);
	ll p = n;
	for(int i = 0; i < m; ++i)
		cin >> a[i].fi >> a[i].se;
	n -= a[0].fi;
	if(n <= 0){
		cout << "No" << endl;
		return;
	}
	n += (a[0].se - a[0].fi);
	n = min(p, n);
	for(int i = 1; i < m; ++i){
		n -= (a[i].fi - a[i-1].se);
		if(n <= 0){
			cout << "No" << endl;
			return;
		}
		n += (a[i].se - a[i].fi);
		n = min(p, n);
	}
	n -= (t - a[m-1].se);
	if(n <= 0)
		cout << "No" << endl;
	else
		cout << "Yes" << endl;
}

int main(){
	ios_base::sync_with_stdio(false), cin.tie(nullptr);
	int t = 1;
	//cin >> t;
	while(t--)
		solve();
}

#include<iostream>
using namespace std;
int main(){
    int N,S,D;
    cin >> N >> S >> D;

    for(int i=0;i<N;i++)
    {
        int a,b;
        cin >> a >> b;

        if(a < S && b > D){
            cout << "Yes" << endl;
            return 0;
        }
    }

    cout << "No" << endl;

}


#include <bits/stdc++.h>

#define ll long long
#define map unordered_map
#define set unordered_set
#define l_l pair<ll, ll>
#define P pair<ll, ll>
#define vll vector<ll>
#define mll map<ll, ll>
#define mp make_pair
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define reps(i, n) for (int i = 1, i##_len = (n); i <= i##_len; ++i)
#define rev(i, n) for (int i = ((int)(n)-1); i >= 0; --i)
#define revs(i, n) for (int i = ((int)(n)); i > 0; --i)
// 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 namespace std;

const ll MOD = 1000000007LL;
const ll INF = (1LL << 60LL);

// template <class T> void plus_mod(T &a, const T &b) {a = (a + b) % MOD;}

template <class T>
void join(vector<T> list) {
  rep(i, list.size()) {
    if (i >= 1) {
      cout << " ";
    }
    cout << (list[i]);
  }
  cout << ("") << endl;
}

int main() {
  // std::cout << std::fixed << std::setprecision(10);

  ll K, N, M;
  scanf("%lld %lld %lld", &K, &N, &M);

  ll ans = 0;

  vector<ll> alist;
  vector<ll> alist2;
  vll blist;

  vector<l_l> s_list;

  ll total = 0;

  rep(i, K) {
    ll v;
    scanf("%lld", &v);
    alist.emplace_back(v);
    alist2.emplace_back(v * M);

    ll n = v * M / N;
    blist.emplace_back(n);

    total += n;

    ll am = v * M % N;
    s_list.emplace_back(mp(am, i));
  }
  sort(s_list.begin(), s_list.end(), greater<P>());

  //
  // cout << ("==================") << endl;

  ll rest = M - total;

  // cout << "rest:" << (rest) << endl;

  rep(i, s_list.size()) {
    if (rest == 0) break;

    // auto s = s_list[i].first;
    auto index = s_list[i].second;

    blist[index]++;
    rest--;
  }

  join(blist);

  // cout << ans << endl;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> iint;
typedef pair<ll,ll> llll;
#define ALL(x) (x).begin(),(x).end()
const ll zero = 0;
const ll one = 1;
const ll INF = 9223372036854775807; //10^18
const int inINF = 2147483647; //10^9
const ll MOD = 1000000007; //10^9+7
const ll MOD2 = 998244353;
void Yes() {printf("Yes\n");}
void No() {printf("No\n");}
void YES() {printf("YES\n");}
void NO() {printf("NO\n");}

int main(){
    ll K, N, M;
    cin >> K >> N >> M;
    vector<int> A(K);
    for (int i = 0; i < K; i++) {
        cin >> A[i];
    }

    ll ok = 2e18+5;
    ll ng = -1;

    while(abs(ok-ng) > 1){
        ll mid = (ok+ng)/2;
        ll mi, ma;
        mi = 0; ma = 0;
        for (ll i = 0; i < K; i++) {
            if(A[i]*M - mid <= 0){
                mi += 0;
            }
            else{
                mi += (A[i]*M - mid + N-1) / N;
            }
            ma += min((mid + A[i]*M)/N, M);
        }
        if(mi <= M && M <= ma){
            ok = mid;
        }
        else{
            ng = mid;
        }
    }

    vector<ll> MI(K), MA(K);
    for (ll i = 0; i < K; i++) {
        if(A[i]*M - ok <= 0){
            MI[i] = 0;
        }
        else{
            MI[i] = (A[i]*M - ok + N-1) / N;
        }
        MA[i] = min((ok + A[i]*M)/N, M);
    }
    vector<ll> B(K);
    ll S = 0;
    for (ll i = 0; i < K; i++) {
        B[i] = MI[i];
        S += MI[i];
    }
    for (ll i = 0; i < K; i++) {
        if(M == S) break;
        B[i] += min(M - S, MA[i] - MI[i]);
        S += min(M - S, MA[i] - MI[i]);
    }
    for (ll i = 0; i < K; i++) {
        cout << B[i] << " ";
    }
    cout << endl;

}


#include "bits/stdc++.h"
// Nagpur ki public bole to taklif
using namespace std;
#define int long long
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define all(x) (x).begin(), (x).end()
#define uniq(v) (v).erase(unique(all(v)), (v).end())
#define sz(x) (int)((x).size())
#define fr first
#define sc second
#define pii pair<int, int>
#define rep(i, a, b) for (int i = a; i < b; i++)
#define mem1(a) memset(a, -1, sizeof(a))
#define mem0(a) memset(a, 0, sizeof(a))
#define ppc __builtin_popcount
#define ppcll __builtin_popcountll
#define fast ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);

template <typename T1, typename T2>
istream &operator>>(istream &in, pair<T1, T2> &a)
{
	in >> a.fr >> a.sc;
	return in;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &out, pair<T1, T2> a)
{
	out << a.fr << " " << a.sc;
	return out;
}
template <typename T, typename T1>
T amax(T &a, T1 b)
{
	if (b > a)
		a = b;
	return a;
}
template <typename T, typename T1>
T amin(T &a, T1 b)
{
	if (b < a)
		a = b;
	return a;
}

template <typename T_vector>
void output_vector(const T_vector &v, bool addOne = false, int start = -1, int end = -1)
{
	if (start < 0)
		start = 0;
	if (end < 0)
		end = (int)v.size();
	for (int i = start; i < end; i++)
		cout << v[i] + (addOne ? 1 : 0) << (i < end - 1 ? ' ' : '\n');
}

int ceil(int x, int y)
{
	return x / y + (x % y > 0);
}

const long long INF = 1e18;
const int32_t M = 1e9 + 7;
const int32_t MM = 998244353;

const int N = 3e5 + 10;

int bit[N];

void update(int i, int x)
{
	i++;
	while (i <= N)
	{
		bit[i] += x;
		i += i & -i;
	}
}

int sum(int i)
{
	i++;
	int ans = 0;
	while (i > 0)
	{
		ans += bit[i];
		i -= i & -i;
	}
	return ans;
}

void solve()
{
	int n;
	cin >> n;
	int v[n + 1];
	for (int i = 1; i <= n; ++i)
	{
		cin >> v[i];
	}

	int inversionCount = 0;
	unordered_map<int, int> m;
	for (int i = 1; i <= n; ++i)
	{
		int tmp = 1LL * (i - 1LL) - sum(v[i]);
		inversionCount += tmp;
		update(v[i], 1);
	}
	for (int i = 1; i <= n; ++i)
	{
		cout << inversionCount << "\n";
		// cout << v[i] << " ->   " << (n - 1LL) << " - " << (2LL * v[i]) << "\n";
		inversionCount += (n - 1LL) - (2LL * v[i]);
	}
}

signed main()
{
	fast
#ifndef ONLINE_JUDGE

		// For getting input from input.txt file
		freopen("input.txt", "r", stdin);

	// Printing the Output to output.txt file
	freopen("output.txt", "w", stdout);

#endif
	cout << setprecision(12);
	cout << fixed;

	int t = 1;
	// cin>>t;
	while (t--)
		solve();

	return 0;
}

#include <cstdio>
#include <cstring>
#include <algorithm>
#define rep(a,b,c) for(int a=b;a<=c;a++)
#define per(a,b,c) for(int a=b;a>=c;a--)
const int N=105;
const int p=1e9+7;
#define int long long
template<class T>inline void read(T &x) {
	T f=1;x=0;char s=getchar();
	while(s<'0'||s>'9'){if(s=='-')f=-1;s=getchar();}
	while(s>='0'&&s<='9'){x=x*10+s-'0';s=getchar();}
	x*=f;
}
int n,m,k,a[N*N],b[N*N],f[N],iv,ml,inv2=((p+1)>>1),du[N];
struct matrix {
	int a[N][N];
	matrix() { memset(a,0,sizeof(a)); }
	inline void init() { rep(i,1,n) a[i][i]=1; }
}Ans,mul;
inline matrix operator *(matrix a,matrix b) {
	matrix c;
	rep(i,1,n) rep(j,1,n) rep(k,1,n) (c.a[i][j]+=(a.a[i][k]*b.a[k][j]%p))%=p;
	return c;
}
inline matrix ksm(matrix a,int b) { matrix c; c.init(); for(;b;b>>=1,a=a*a) if(b&1) c=c*a; return c; }
inline int ksm(int a,int b) { int ans=1; for(;b;b>>=1,(a*=a)%=p) if(b&1) (ans*=a)%=p; return ans; }
signed main() {
    read(n); read(m); read(k); iv=ksm(m,p-2);
    rep(i,1,n) read(f[i]);
    rep(i,1,m) read(a[i]),read(b[i]),du[a[i]]++,du[b[i]]++;
    rep(i,1,n) Ans.a[1][i]=f[i];
    rep(i,1,n) mul.a[i][i]=(iv*(m-du[i]))%p;
    rep(i,1,m) {
    	(mul.a[a[i]][a[i]]+=(iv*inv2%p))%=p;
    	(mul.a[b[i]][b[i]]+=(iv*inv2%p))%=p;
    	(mul.a[a[i]][b[i]]+=(iv*inv2%p))%=p;
    	(mul.a[b[i]][a[i]]+=(iv*inv2%p))%=p;
	}
	mul=ksm(mul,k); Ans=Ans*mul;
	rep(i,1,n) printf("%lld\n",Ans.a[1][i]);
}


#include <bits/stdc++.h>
#include <vector>
#include<math.h>
#include<string.h>
using namespace std;
#define MAX 200005
#define MOD 998244353
#define SMOD 998244353
#define ROOT 512
#define GMAX 20
#define INF 2000000000
#define EPS 0.000000001
#define NIL 0
#define FASTIO ios_base::sync_with_stdio(false);cin.tie(NULL)
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
int prime[MAX+1],val[MAX+1];
void sieve()
{
    int i,j;
    for(i=2; i*i<=MAX; i++)
    {
        if(prime[i]) continue;
        for(j=i; j*i<=MAX; j++)
        {
            if(prime[i*j]==0) prime[i*j]=i;
        }
    }
    for(i=2;i<=MAX;i++)
    {
        if(prime[i]==0)
        {
            val[i]=1;
        }
        else
        {
            val[i]=1+val[i/prime[i]];
        }
    }
}
int main()
{
    sieve();
    int n,i;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
        printf("%d ",val[i]+1);
    }
    return 0;
}

#include<bits/stdc++.h>
#define FastRead                      \
                                    ios_base::sync_with_stdio(false); \
                                    cin.tie(0);
#define ll long long
#define endl "\n"
#define f for
#define ml ll t,g; cin>>t; f(g=0;g<t;g++)
#define pi acos(-1)
using namespace std;
bool cmp(const pair<string,ll> &a,
         const pair<string,ll> &b)
{
    if(a.second!=b.second)
        return (a.second > b.second);
    else
        return (a.first < b.first);
}
int main()
{
    FastRead
    ll n,i,m,s=0,c=0;
    string a;
    cin>>a;
    f(i=0; i<a.size(); i++)
    {
        s=s+((ll)a[i]-48);
    }
    if(s%3==0)
        cout<<"0";
    else
    {
        f(i=0; i<a.size(); i++)
        {
            if((s-((ll)a[i]-48)!=0)&&(s-((ll)a[i]-48))%3==0)
            {
                c=1;
                break;
            }

        }
        if(c>0)
            cout<<"1";
        else if(a.size()==1 || a.size()==2)
            cout<<"-1";
        else
            cout<<"2";

    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;
using namespace chrono;
typedef int64_t ll;
typedef long double ld;
typedef unsigned long long ULL;
#define endl "\n"
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define pb push_back
void read(vector<int> &a) {for (auto &x : a)cin >> x;}
void read(vector<ll> &a) {for (auto &x : a)cin >> x;}
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
#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 {
#ifndef ONLINE_JUDGE
    ~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__) << "] "

const int MOD = 1e9 + 7;
const int INF = (int)2e9 + 7;
const ll LINF = (ll)1e18;
const ld PI = 3.1415926535897932384626433832795;

void solve() {
    int a, b, c;
    cin >> a >> b >> c;
    if (a == b) {
        cout << "=";
    }
    else if (abs(a) == abs(b)) {
        if (c % 2 == 0) {
            cout << "=";
        }
        else if (a > 0 && b < 0) {
            cout << ">";
        }
        else if (b > 0 && a < 0) {
            cout << "<";
        }
        else {
            assert(false);
        }
    }
    else if (a == 0 || b == 0) {
        if (a == 0 && b == 0) {
            cout << "=";
        }
        else if (a == 0) {
            if (b > 0) {
                cout << "<";
            }
            else if (b < 0 && c % 2 == 0) {
                cout << "<";
            }
            else {
                cout << ">";
            }
        }
        else {
            if (a > 0) {
                cout << ">";
            }
            else if (a < 0 && c % 2 == 0) {
                cout << ">";
            }
            else {
                cout << "<";
            }
        }
    }
    else if (a < 0 && b < 0) {
        if (c % 2 == 0) {
            if (abs(a) < abs(b)) {
                cout << "<";
            }
            else {
                cout << ">";
            }
        }
        else if (a < b) {
            cout << "<";
        }
        else {
            cout << ">";
        }
    }
    else if (a > 0 && b > 0) {
        if (a < b) {
            cout << "<";
        }
        else {
            cout << ">";
        }
    }
    else if (a < 0 && b > 0) {
        if (c % 2 == 0) {
            if (abs(a) > abs(b)) {
                cout << ">";
            }
            else {
                cout << "<";
            }
        }
        else {
            cout << "<";
        }
    }
    else if (a > 0 && b < 0) {
        if (c % 2 == 0) {
            if (abs(a) > abs(b)) {
                cout << ">";
            }
            else {
                cout << "<";
            }
        }
        else {
            cout << ">";
        }
    }
}

int32_t main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t = 1;
    //cin >> t;
    auto t1 = high_resolution_clock::now();
    for (int tt = 1; tt <= t; tt++)
    {
        //cout << "Case #" << tt << ": ";
        solve();
    }
    auto t2 = high_resolution_clock::now();
    auto time = duration_cast<duration<double>>(t2 - t1);
    cerr << "Time elapsed = " << time.count() << endl;
}

#include<bits/stdc++.h>

using namespace std;

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

  	if(A>=0 && B>=0){
    	if(A>B) cout<<">";
      	else if(B>A) cout<<"<";
      	else cout<<"=";
    }

  else if(A<0 && B>=0 && C%2==0){
  	A = -A;
    if(A>B) cout<<">";
    else if(B>A) cout<<"<";
    else cout<<"=";
  }

   else if(A>=0 && B<0 && C%2==0){
  	B = -B;
    if(A>B) cout<<">";
    else if(B>A) cout<<"<";
    else cout<<"=";
  }

   else if(A<0 && B<0 && C%2==0){
    if(A<B) cout<<">";
    else if(B<A) cout<<"<";
    else cout<<"=";
  }

  else{
  	if(A>B) cout<<">";
    else if(A<B) cout<<"<";
    else cout<<"=";
  }

  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;
typedef long long ll;
template<class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template<class A> ostream& operator<<(ostream &cout, vector<A> const &v) {cout << "["; for(int i = 0; i < v.size(); i++) {if (i) cout << ", "; cout << v[i];} return cout << "]";};
template<class A, class B> ostream& operator<<(ostream &cout, const pair<A,B> &x) {return cout << "(" <<x.first << ", " << x.second << ")";};
template<class T> void pv(T a, T b) {cerr << "["; for (T i = a; i != b; ++i) {if (i != a) cerr << ", "; cerr << *i;}cerr << "]\n";}
void _print() {cerr << "]\n";}
template<class T, class... V> void _print(T t, V... v) {cerr << t; if (sizeof...(v)) cerr << ", "; _print(v...);}
#define debug(x...) cerr << "[" << #x << "] = [", _print(x)
#define fi first
#define se second
#define SZ(x) (int)((x).size())
#define pii pair<int,int>
#define uid(x,y) uniform_int_distribution<int>(x,y)(rng)
int a[100005];
int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    int n;
    cin >> n;
    for (int q = 1; q <= n; q++) cin >> a[q];
    sort(a,a+(n+1));
    ll ans = 1;
    for (int q = 1; q <= n; q++) {
        ans *= (a[q]-a[q-1]+1);
        ans %= 1000000007;
    }
    cout << ans << '\n';
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define     ll              long long
#define     mp              make_pair
#define     rep(i,a,b)      for( i=a;i<b;++i)
#define     repr(i,a,b)     for( i=a;i>=b;i--)
#define     up              upper_bound
#define     lb              lower_bound
#define     t()             int test;cin>>test;while(test--)
#define     IOS             ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
    template <typename Arg1>
    void __f(const char* name, Arg1&& arg1){
        cout << name << " : " << arg1 << endl;
        //use cerr if u want to display at the bottom
    }
    template <typename Arg1, typename... Args>
    void __f(const char* names, Arg1&& arg1, Args&&... args){
        const char* comma = strchr(names + 1, ','); cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
    }
#else
#define trace(...)
#endif

// const ll mod = 1e9 + 7;

// ll nCr(ll n,ll r){
//     ll f[1001] = {0};
//     f[0] = f[1] = 1;
//     for(ll i = 2;i <= n;i++){
//         f[i] = 1;
//         for(ll j = i-1;j >= 1;j--){
//             f[j] = (f[j]+f[j-1])%mod;
//         }
//     }
//     return f[r];
// }

int main()
{
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    IOS;
    ll n;
    cin >> n;
    ll m = (ll)(pow(2,n) + 0.5);
    ll a[m];
    for(ll i = 0;i < m;i++){
        cin >> a[i];
    }
    ll maxi = 0,index = 0;
    vector<pair<ll,ll>> nums;
    for(ll i = 0;i < m/2;i++){
        if(a[i] > maxi){
            maxi = a[i];
            index = i;
        }
    }
    nums.push_back({maxi,index});
    maxi = 0,index = 0;
    for(ll i = m/2;i < m;i++){
        if(a[i] > maxi){
            maxi = a[i];
            index = i;
        }
    }
    nums.push_back({maxi,index});
    if(nums[0].first > nums[1].first){
        cout << nums[1].second + 1 << "\n";
    }else{
        cout << nums[0].second + 1 << "\n";
    }
    return 0;
}


#include <bits/stdc++.h>
//#include <atcoder/all.hpp>

using namespace std;
//using namespace atcoder;

#define all(v) v.begin(), v.end()
#define SZ(x) ((int)(x).size())
#define pb push_back
#define PA pair<int, int>
typedef long long ll;
#define rep(i, z, n) for(int i = z; i < n; i++)
//const ll INF = 1e9;
const ll INF = 1000000007;
//const ll MOD = 9223372036854775807;
//const ll MOD2 = 998244353;
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; }

int N, M;
vector<int> H(200001, -1), W(200001, -1);
vector<int> sum1(100000, -1);
vector<int> sum2(100000, -1);

ll cal(int tea, int posi){
    ll ans = abs(tea - H[2 * posi]);
    //cout << posi << " " << ans << endl;
    if(posi >= 1) ans += sum1[posi - 1];
    //cout << ans << endl;
    if(posi < (N - 1)/2) ans += sum2[posi];
    //cout << ans << endl;
    //cout << endl;
    return ans;
}
int main(){
    cin >> N >> M;
    H.resize(N);
    W.resize(M);
    rep(i, 0, N) cin >> H[i];
    rep(i, 0 ,M) cin >> W[i];
    sort(all(H));
    sort(all(W));

    rep(i, 0, (N - 3) / 2 + 1){
        sum1[i] = (H[2 * i + 1] - H[2 * i]);
        sum2[i] = (H[2 * i + 2] - H[2 * i + 1]);
        if(i >= 1){
            sum1[i] += sum1[i - 1];
        }
    }
    for(int i = (N - 3) / 2; i >= 1; i--){
        sum2[i - 1] += sum2[i];
    }

    int position = 0;
    ll ans = INF;
    rep(i, 0, M){
        while((W[i] > H[position]) && (position < N)){
            position++;
        }
        //cout << cal(W[i], position/2) << " " << position << endl;
        ans = min(ans, cal(W[i], position/2));
    }
    rep(i, 0 ,(N - 1)/2){
        //cout << i << " " << sum2[i] << endl;;
    }
    cout << ans << endl;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n;

   cin>>n;

   int k;
   cin>>k;

     long long int s(0);
    for(int i=1;i<=n; ++i)
     {

           for(int j=1;j<=k; ++j)
           {
                s+=100*i+j;
           }
     }
      cout<<s;
     //else

}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

#define ff                  first
#define ss                  second
#define pb                  push_back
#define eb                  emplace_back
#define mp                  make_pair
#define lb                  lower_bound
#define ub                  upper_bound
#define setbits(x)          __builtin_popcountll(x)
#define zrobits(x)          __builtin_ctzll(x)
#define sz(v)               (int)v.size()
#define ps(y)               cout << fixed << setprecision(y)
#define ms(arr, v)          memset(arr, v, sizeof(arr))
#define all(v)              v.begin(), v.end()
#define rall(v)             v.rbegin(), v.rend()
#define trav(x, v)          for(auto &x: v)
#define w(t)                int t; cin >> t; while(t--)
#define rep0(i, n)          for(int i = 0; i < n; i++)
#define rrep0(i, n)         for(int i = n - 1; i >= 0; i--)
#define rep1(i, n)          for(int i = 1; i <= n; i++)
#define rrep1(i, n)         for(int i = n; i > 0; i--)
#define inp(arr, n)         rep0(i, n) cin >> arr[i];
#define rep(i, a, b)        for(int i = a; i <= b; i++)
#define rrep(i, a, b)       for(int i = a; i >= b; i--)

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> pii;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<pii> vp;
typedef vector<bool> vb;
typedef vector<string> vs;
typedef map<ll, ll> mii;
typedef map<char, ll> mci;
typedef priority_queue<ll> pq_mx;
typedef priority_queue<ll, vi, greater<>> pq_mn;
typedef tree<ll, null_type, less<>, rb_tree_tag, tree_order_statistics_node_update> pbds;
/*
 * find_by_order(i) -> returns an iterator to the element at ith position (0 based)
 * order_of_key(i)  -> returns the position of element i (0 based)
 */

const int N = 2e6 + 5;
const int mod = 1e9 + 7;
//const int mod = 998244353;
const ll inf = 1e18;

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

void fio() {
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
}

const int M = 1e7 + 5;
ll spf[M], mobius[M];
vi primes;

void sieve() {
    rep(x, 2, 1e7) {
        if (spf[x] == 0) spf[x] = x, primes.pb(x);
        for (int y = 0; y < sz(primes) and primes[y] <= spf[x] and x * primes[y] <= 1e7; y++)
            spf[x * primes[y]] = primes[y];
    }
}

void Mobius() {
    /*
     * mobius[x] =  1 => x is a square-free +ve int with even no. of prime factors
     * mobius[x] = -1 => x is a square-free +ve int with odd no. of prime factors
     * mobius[x] =  0 => x has a squared prime factor
     */

    rep1(x, 1e7) {
        if (x == 1) mobius[x] = 1;
        else {
            if (spf[x] == spf[x / spf[x]]) mobius[x] = 0;
            else mobius[x] = -mobius[x / spf[x]];
        }
    }
}

int main() {
    fio();
    sieve();
    Mobius();

    int l, r;
    cin >> l >> r;
  	if(l == 1) ++l;

    ll res = 0;
    rep(x, 2, r) {
        ll cur = r / x - (l - 1) / x;
        res -= cur * cur * mobius[x];
    }
//    cout << res << endl;
    rep(x, l, r) {
        --res;
        for (int y = 2 * x; y <= r; y += x) res -= 2;
    }
    cout << res;

    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 = 300005;
int cnt[MAX_N];

int main()
{
	ll N,K;
	cin >> N >> K;
	//N = 300000;
	rep(i,N)
	{
		int a;
		//a = 0;
		cin >> a;
		cnt[a]++;
	}

	ll ans = 0;
	while(K > ll(0))
	{
		int idx = 0;
		if (cnt[idx] == 0) break;
		while(cnt[idx] > 0)
		{
			cnt[idx]--;
			idx++;
		}
		ans += idx;
		K--;
	}
	cout << ans << endl;
	return 0;
}


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

#define ff              first
#define ss              second
#define int             long long
#define pb              push_back
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define mod             1000000007
#define inf             1e18
#define ps(x,y)         cout<<setprecision(y)<<x
#define mk(arr,n,type)  type *arr=new type[n];
#define w(x)            int x; cin>>x; while(x--)
#define pw(b,p)         pow(b,p) + 0.1
#define endl            "\n"
mt19937                 rng(chrono::steady_clock::now().time_since_epoch().count());

void __print(int32_t 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

char myHeap[200 * 1024 * 1024];
int sz = 0;
void assert_tle(bool q) { while (!q); }
void* operator new  ( std::size_t count ) {
    sz += count;
    assert_tle(sz <= 200 * 1024 * 1024);
    return myHeap + sz - count;
}

void operator delete (void *ptr) { }

void fastIO()
{
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
}
vector<int> ans;

void dfs(vector<pii> graph[],int cur)
{
    for(pii i: graph[cur])
    {
        if(ans[i.ff]!=-1)
        {
            continue;
        }
        else
        {
            if(ans[cur]!=i.ss)
            {
                ans[i.ff]=i.ss;
            }
            else
            {
                ans[i.ff]=ans[cur]==0?1:(ans[cur]-1);
            }

            dfs(graph,i.ff);
        }
    }
}

void solve()
{
    int n,m;
    cin>>n>>m;
    ans.assign(n,-1);
    vector<pii> graph[n];
    for(int i=0;i<m;i++)
    {
        int a,b,c;
        cin>>a>>b>>c;
        a--;b--;
        c--;
        graph[a].pb({b,c});
        graph[b].pb({a,c});
    }

    ans[0]=0;
    dfs(graph,0);
    for(int i: ans)
    {
        cout<<i+1<<endl;
    }
}

int32_t main()
{
    fastIO();
   // w(t)
    {
        solve();
        cout<<endl;
    }
    return 0;
}

#include<iostream>
#define val first
#define type second
using namespace std;
typedef pair<int, int> Filter;
const int FILTER = 200005;
const int QUERY = 200005;
const long long INF = 1LL << 60;

int nFilter;
Filter filter[FILTER];
int nQuery;
int query[QUERY];

void read() {
    cin >> nFilter;
    for (int i = 0; i < nFilter; ++i) {
        cin >> filter[i].val >> filter[i].type;
    }
    cin >> nQuery;
    for (int i = 0; i < nQuery; ++i) {
        cin >> query[i];
    }
}

void work() {
    long long maxMaxV = -INF;
    long long minMinV = INF;
    long long sum = 0;

    for (int i = 0; i < nFilter; ++i) {
        Filter &f = filter[i];
        if (f.type == 1) {
            maxMaxV += f.val;
            minMinV += f.val;
            sum += f.val;
        } else if (f.type == 2) {
            maxMaxV = max(maxMaxV, 1LL * f.val);
            minMinV = max(minMinV, 1LL * f.val);
        } else if (f.type == 3) {
            minMinV = min(minMinV, 1LL * f.val);
            maxMaxV = min(maxMaxV, 1LL * f.val);
        }
    }

    for (int i = 0; i < nQuery; ++i) {
        cout << max(maxMaxV, min(minMinV, 1LL * query[i] + sum)) << endl;
    }
}

int main() {
    read();
    work();
    return 0;
}