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

// template {{{  0
// using {{{ 1
using ll = long long int;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vii = vector<pii>;
using vll = vector<pll>;
// }}} 1
// definition {{{ 1
// scaning {{{ 2
#define Scd(x) scanf("%d", &x)
#define Scd2(x,y) scanf("%d%d", &x, &y)
#define Scd3(x,y,z) scanf("%d%d%d", &x, &y, &z)
#define Scll(x) scanf("%lld", &x)
#define Scll2(x,y) scanf("%lld%lld", &x, &y)
#define Scll3(x,y,z) scanf("%lld%lld%lld", &x, &y, &z)
#define Scc(c) scanf("%c", &c);
#define Scs(s) scanf("%s", s);
#define Scstr(s) scanf("%s", &s);
// }}} 2
// constants {{{ 2
#define EPS (1e-7)
#define INF (2e9)
#define PI (acos(-1))
// }}} 2
// systems {{{ 2
#define Repe(x,y,z) for(ll x = z; x < y; x++)
#define Rep(x,y) Repe(x,y,0)
#define RRepe(x,y,z) for(ll x = y-z-1; x >= 0; x--)
#define RRep(x,y) RRepe(x,y,0)
// }}} 2
// output {{{ 2
#define YesNo(a) (a)?printf("Yes\n"):printf("No\n")
#define YESNO(a) (a)?printf("YES\n"):printf("NO\n")
// }}} 2
// }}} 1
// input {{{ 1
// }}} 1
// }}} 0

int N,K;
ll f( int k ){
    return max( 0, k - 1 - 2 * max( 0, k - N - 1 ) );
}

int main() {
    Scd2(N,K);

    K = abs(K);

    ll ans = 0;
    Repe(ab,2*N+1,2){
        int cd = ab-K;
        if( 2 <= cd && cd <= 2*N ) ans += f(ab) * f(cd);
    }

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

    return 0;
}

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#pragma GCC optimize ("-O3")
#define int long long
#define ld long double
#define endl "\n"

#define rep(i,begin,end) for (__typeof(end) i=begin-(begin>end); i!=(end)-(begin>end); i+=1-2*(begin>end))
#define umap unordered_map
#define pq priority_queue
#define pb push_back
#define mp make_pair
#define fs first
#define sec second
#define lb lower_bound
#define ub upper_bound
#define mii map<int,int>
#define pii pair<int,int>
#define vc vector
#define vi vc<int>
#define vvi vc<vi>
#define all(v) v.begin(),v.end()
#define tol(s) transform(s.begin(),s.end(),s.begin(),::tolower);
#define tou(s) transform(s.begin(),s.end(),s.begin(),::toupper);
#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) ((a)*(b))/gcd((a),(b))
#define remax(a,b) a = max(a,b)
#define remin(a,b) a = min(a,b)
#define w(t) int t; cin>>t; rep(tc,0,t)
#define clr(a,x) memset(a,x,sizeof a)

#define chkbit(x,i) ((x)&(1LL<<(i)))
#define setbit(x,i) ((x)|(1LL<<(i)))
#define setbits(x)  __builtin_popcountll(x)
#define zerobits(x) __builtin_ctzll(x)
#define ps(x,y) fixed<<setprecision(y)<<x
#define print(a, n) rep(i,0,n) cout<<a[i]<<" "; cout<<endl;
#define printclock cerr<<"Time : "<<1000*(ld)clock()/(ld)CLOCKS_PER_SEC<<"ms\n";

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds;

const int mod = 1e9+7;
const int mod2 = 998244353;
const int N = 2e5;
const int inf = 1e18;
const ld PI = 3.141592653589793;

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

template<typename... T>
void in(T&... args) {((cin>>args), ...);}
template<typename... T>
void out(T&&... args) {((cout<<args<<" "), ...);}
template<typename... T>
void outln(T&&... args) {((cout<<args<<" "), ...); cout<<endl;}

int nxt(){int x;cin>>x;return x;}
int add(int a,int b,int mod){int res=(a+b)%mod;return (res<0)?res+mod:res;}
int mul(int a,int b,int mod){int res=(a*1LL*b)%mod;return (res<0)?res+mod:res;}
int range(int x,int y,int z) {return (x >= y && x <= z);}

struct customCompare {
    bool operator () (int x, int y) {
        return x>y;
    }
};

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

int calc(int x){
    return ((x*(x+1))/2)%mod2;
}

void solve() {
    int n, k;
    in(n, k);

    int ans = 0;
    for(int i = 2; i <= 2*n; i++){
        int j = i - k;
        if (j >= 2 && j <= 2*n){
            ans += min(i-1, 2*n-(i-1)) * min(j-1, 2*n-(j-1));
        }
    }

    cout << ans << endl;
}

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);

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

    // printclock;
    return 0;
}


#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;

using namespace std;
#define  fastio    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define  int       long long
#define  pb        push_back
#define  vi        vector
#define  mod       1000000007
#define  all(v)    v.begin(),v.end()
#define  maxv(a)   *max_element(all(a))
#define  minv(a)   *min_element(all(a))
#define  sumv(a)    accumulate(all(a),0)
//#define  endl       '\n'

void solve()
{
	int n,m;
	cin>>n>>m;
	if(m%n==0)cout<<"Yes"<<endl;
	else cout<<"No"<<endl;

}

signed main()
{
	fastio;
	int t=1;
//	cin>>t;
	while(t--)
	{
		solve();
	}
}

#define LOCAL_DBG
#ifdef LOCAL_DBG
    #define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
using namespace std;
template<typename K, typename V> using umap = unordered_map<K, V>;
template<typename T> using pque = priority_queue<T>;
template<typename T> using revpque = priority_queue<T, vector<T>, greater<T>>;
using ll = long long;
using ld = long double;
using str = string;
using pll = pair<ll, ll>;
using pii = pair<int, int>;
using vll = vector<ll>;
using vi = vector<int>;
using vs = vector<str>;
using umapll = umap<ll, ll>;
#define _rep(i, n) _repi(i, 0, n)
#define _repi(i, l, r) for (ll i = ll(l); i < ll(r); i++)
#define _get_rep(_1, _2, _3, NAME, ...) NAME
#define rep(...) _get_rep(__VA_ARGS__, _repi, _rep) (__VA_ARGS__)
#define _rrep(i, n) for (ll i = ll(n) - 1; 0 <= i; i--)
#define _rrepi(i, l, r) for (ll i = ll(r) - 1; l <= i; i--)
#define _get_rrep(_1, _2, _3, NAME, ...) NAME
#define rrep(...) _get_rrep(__VA_ARGS__, _rrepi, _rrep) (__VA_ARGS__)
#define each(...) for (auto __VA_ARGS__)
#define all(x) x.begin(), x.end()
#define mkpair make_pair
#define is_in(x, l, r) ((l) <= (x) && (x) < (r))
#define in(t, ...) t __VA_ARGS__; isin(cin, __VA_ARGS__)
#define inv(t, v, n) vector<t> v(n); isin(cin, v)
#define inv2(t, v, h, w) vector<vector<t>> v(h, vector<t>(w)); isin(cin, v)
#define invv(t, va, vb, n) vector<t> va(n), vb(n); rep (i, n) { isin(cin, va[i], vb[i]); }
#define invvv(t, va, vb, vc, n) vector<t> va(n), vb(n), vc(n); rep (i, n) { isin(cin, va[i], vb[i], vc[i]); }
#define inln(s) str s; getline(cin, s)
#define print(...) osout(cout, __VA_ARGS__)
#ifdef LOCAL_DBG
    #define dbg(...) osout(cerr, __VA_ARGS__)
#else
    #define dbg(...)
#endif
const ll inf = numeric_limits<ll>::max() / 2;
template<typename T> bool chmax(T &x, const T &y) { if (x < y) { x = y; return 1; } return 0; }
template<typename T> bool chmin(T &x, const T &y) { if (x > y) { x = y; return 1; } return 0; }
template<typename T> void sort(vector<T> &v) { sort(all(v)); }
template<typename T> void rsort(vector<T> &v) { sort(all(v), greater<T>()); }
template<typename T> void dec(vector<T> &v) { rep (i, v.size()) v[i]--; }
template<typename T> istream& operator >>(istream &is, vector<T> &v) {
    rep (i, v.size()) { cin >> v[i]; } return is;
}
template<typename T1, typename T2> ostream& operator <<(ostream &os, pair<T1, T2> p) {
    if (&os == &cout) { os << p.first << ' ' << p.second; }
    if (&os == &cerr) { os << '(' << p.first << ", " << p.second << ')'; }
    return os;
}
template<typename T> ostream& operator <<(ostream &os, vector<T> v) {
    if (&os == &cout) { rep(i, v.size() - 1) { os << v[i] << ' '; } os << v[v.size() - 1]; }
    if (&os == &cerr) { os << '['; rep(i, v.size() - 1) { os << v[i] << ", "; } os << v[v.size() - 1] << ']'; }
    return os;
}
void isin(__attribute__((unused)) istream &_) {}
template<class S, class... T> void isin(istream &is, S &s, T&... t) {
    is >> s; isin(is, t...);
}
void osout(ostream& os) { os << '\n'; }
template<class S, class... T> void osout(ostream &os, S s, T... t) {
    os << s; if (sizeof...(t)) os << ' '; osout(os, t...);
}
namespace config {
    int precision;
    void update();
}
void solve();
int main() {
    config::update();

    cin.tie(0);
    ios::sync_with_stdio(false);
    if (config::precision) {
        cout << fixed << setprecision(15);
        cerr << fixed << setprecision(15);
    }

    solve();

    #ifdef LOCAL_DBG
        dbg("time:", 1000 * clock() / CLOCKS_PER_SEC, "[ms]");
    #endif
}
void config::update() {
    precision = 0;
}

void solve() {
  in(ll,n);
  invv(ll,a,b,n);
  ll ans=inf;
  rep(i,n)rep(j,n) {
    if(i==j) chmin(ans, a[i]+b[j]);
    else chmin(ans, max(a[i],b[j]));
  }
  print(ans);
}


#include<bits/stdc++.h>
long long n,v;
int main()
{
	scanf("%lld",&n); v=sqrt(2*(n+1))-1;
	while((v+1)*(v+2)/2<=n+1) v++;
	printf("%lld",n-v+1);
}

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#ifndef aa
#define trace(...)
#define endl '\n'
#endif
#define pb push_back
#define ub upper_bound
#define lb lower_bound
#define fi first
#define se second
#define int long long
typedef long long ll;
typedef long double ld;
#define pii pair<int,int>
#define pll pair<ll,ll>
#define sz(x) ((long long)x.size())
#define fr(a,b,c) for(int a=b; a<=c; a++)
#define frev(a,b,c) for(int a=c; a>=b; a--)
#define rep(a,b,c) for(int a=b; a<c; a++)
#define trav(a,x) for(auto &a:x)
#define all(con) con.begin(),con.end()
#define done(x) {cout << x << endl;return;}
#define mini(x,y) x=min(x,y)
#define maxi(x,y) x=max(x,y)
const ll infl = 0x3f3f3f3f3f3f3f3fLL;
const int infi = 0x3f3f3f3f;
mt19937_64 mt(chrono::steady_clock::now().time_since_epoch().count());
const int mod = 998244353;
//const int mod = 1e9 + 7;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<vector<int>> vvi;
typedef vector<pair<int, int>> vpii;
typedef map<int, int> mii;
typedef set<int> si;
typedef set<pair<int,int>> spii;
typedef queue<int> qi;
uniform_int_distribution<int> rng(1,1e9);

//DEBUG FUNCTIONS START
#define cerr cout
void __print(int 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 deb(x...) cerr << "[" << #x << "] = "; _print(x)
#define deb(x...)  _print(x)
#else
#define deb(x...)
#endif
// DEBUG FUNCTIONS END

const int N = 2e5+5;

void solve(){

	int n;
	cin>>n;

	int l=0, r = 2e9, ans=0;
	while(l<=r){
		int x = (l+r)/2;
		if((x+2)*(x+3) > 2*(n+1))
			ans = x, r = x-1;
		else
			l = x + 1;
	}

	cout << n - ans;

}

signed main() {
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    cout << fixed << setprecision(15);
    int t = 1;
    //cin >> t;
    while (t--)
        solve();
    return 0;
}

int powm(int a, int b){
    int res = 1;
    while (b) {
        if (b & 1)
            res = (res*a) % mod;
        a = (a * a) % mod;
        b >>= 1;
    }
    return res;
}

int divide(int a, int b) {
    return (a % mod) * powm(b % mod, mod - 2) % mod;
}

void norm(int &a) {
    while (a >= mod) a -= mod;
    while (a < 0) a += mod;
}


//高知能系Vtuberの高井茅乃です。
//Twitter: https://twitter.com/takaichino
//YouTube: https://www.youtube.com/channel/UCTOxnI3eOI_o1HRgzq-LEZw

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

#define INF INT_MAX
#define LLINF LLONG_MAX
#define REP(i,n) for(int i=0;i<n;i++)
#define REP1(i,n) for(int i=1;i<=n;i++)
#define MODA 1000000007
#define MODB  998244353

template <typename T>
std::istream& operator>>(std::istream& is, std::vector<T>& vec) {
    for (T& x: vec) { is >> x; }
    return is;
}

int main() {
	ll ans = 0;
	ll tmp = 0;
	//int n; cin >> n;
	string s;
	cin >> s;
	REP(i, s.size()){
		if(s[i] == '.') break;
		else cout << s[i];
	}
	cout << endl;
}

//Sumonto Chatterjee
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define f1(a,b) for(ll i=a;i<=b;i++)
#define f2(a,b) for(ll j=a;j<=b;j++)
#define f3(a,b) for(ll k=a;k<=b;k++)
#define fr(a,b) for(ll r=a;r>=b;r--)
#define all(a) a.begin(),a.end()
#define pb push_back
#define vll vector<long long int>
#define LL (ll)
#define mod 1000000007
#define line '\n'
// vector<bool> isprime(2e5+5, true);
// void sieve(ll n)
// {
// 	isprime[0]=isprime[1]=false;
// 	for (ll i = 2; i * i <= n; i++)
// 		if (isprime[i])
// 	    	for (ll j = i * i; j <= n; j += i)
// 	            isprime[j] = false;
// }
// ll expo(ll a, ll b, ll m)
// {
//     a %= m;
//     long long res = 1;
//     while (b > 0)
//     {
//         if (b & 1)
//             res = res * a % m;
//         a = a * a % m;
//         b >>= 1;
//     }
//     return res;
// }
// /*segment tree*/
// ll tree[4*200005];
// /*initally, v=1, l=0, r=n-1, pos in 0 based index*/
// void update(ll v, ll pos, ll val, ll l, ll r)
// {
// 	if(l==r)
// 		tree[v]=val;
// 	else
// 	{
// 		ll mid=(l+r)/2;
// 		if(pos<=mid)
// 			update(2*v, pos, val, l, mid);
// 		else
// 			update(2*v+1, pos, val, mid+1, r);
// 		tree[v]=tree[2*v]+tree[2*v+1];
// 	}
// }
// l,r are array segment bounds, x,y are query bounds.....all are in 0 based index
// ll query(ll v, ll l, ll r, ll x, ll y)
// {
// 	if(x>y)
// 		return 0;
// 	if(l==x && r==y)
// 		return tree[v];
// 	ll mid=(l+r)/2;
// 	return query(2*v, l, mid, x, min(y, mid))+query(2*v+1, mid+1, r, max(x, mid+1), y);
// }
// void range_update(ll v, ll x, ll y, ll val, ll l, ll r)
// {
// 	if(x>y) return;
// 	if(l==x && y==r)
// 		tree[v]+=val;
// 	else
// 	{
// 		ll mid=(l+r)/2;
// 		range_update(2*v,x, min(mid, y), val, l, mid);
// 		range_update(2*v+1, max(x, mid+1), y, val, mid+1, r);
// 	}
// }
// ll range_query(ll v, ll l, ll r, ll pos)
// {
// 	if(l==r)
// 		return tree[v];
// 	ll mid=(l+r)/2;
// 	if(pos<=mid)
// 		return tree[v]+range_query(2*v, l, mid, pos);
// 	else
// 		return tree[v]+range_query(2*v+1, mid+1, r, pos);
// }
void solve()
{
	ll n;
	cin>>n;
	if(n==0)
	{
		cout<<"Yes"<<line;
		return;
	}
	while(n%10==0)
	{
		n/=10;
	}
	ll val=0, temp=n;
	while(temp)
	{
		val = val*10 + (temp%10);
		temp/=10;
	}
	if(n==val)
		cout<<"Yes"<<line;
	else
		cout<<"No"<<line;
}
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    #ifndef ONLINE_JUDGE
    	freopen("input.txt", "r", stdin);
    	freopen("output.txt", "w", stdout);
    #endif
	//ll t; cin>>t; while(t--)
	solve();
}


#include <bits/stdc++.h>
#define ALL(v) v.begin(), v.end()
#define MAX 510000
#define rrep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rep(i, n) for(ll i = 1; i <= (ll)(n); i++)
#define dcout cout<<fixed<<setprecision(15);
#define mp make_pair
#define pb push_back
using namespace std;
typedef long long int  ll;
typedef pair<ll, ll> P;
constexpr int MOD = 1e9 + 7;
constexpr ll inf = 1LL << 60;
template< typename S, typename T >
inline void chmax(S &a, const T &b) { if(a < b) a = b; }
template< typename S, typename T >
inline void chmin(S &a, const T &b) { if(a > b) a = b; }

ll gcd(ll x, ll y) {	if (x == 0) return y;	return gcd(y%x, x);}
ll lcm(ll x, ll y) { return x * y / gcd(x, y); }
ll modpow(ll a, ll n, ll p) {	if(n==0) return (ll)1;  if (n == 1) return a % p;  if (n % 2 == 1) return (a * modpow(a, n - 1, p)) % p;  ll t = modpow(a, n / 2, p);  return (t * t) % p;}
ll modinv(ll a, ll m) {	if(m==0)return (ll)1;	ll b = m, u = 1, v = 0;	while (b) {		ll t = a / b;		a -= t * b; swap(a, b);		u -= t * v; swap(u, v);	}	u %= m;	if (u < 0) u += m;	return u;}
ll fac[MAX], finv[MAX], inv[MAX];
void COMinit() {	fac[0] = fac[1] = 1;	finv[0] = finv[1] = 1;	inv[1] = 1;	for (int i = 2; i < MAX; i++) {		fac[i] = fac[i - 1] * i % MOD;		inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;		finv[i] = finv[i - 1] * inv[i] % MOD;	}}
ll COM(ll n, ll k) {	if (n < k) return 0;	if (n < 0 || k < 0) return 0;	return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;}
ll com(ll n,ll m){   if(n<m || n<=0 ||m<0){		return 0;	}	if( m==0 || n==m){		return 1;	}	ll k=1;	for(ll i=1;i<=m;i++){       k*=(n-i+1); 	   k%=MOD;	   k*=modinv(i,MOD);	   k%=MOD;	}	return k;}
ll rad(ll u, ll p){ ll cnt=0;	while(u%p==0){		u/=p;		cnt++;	}	return cnt;}
////////////////////////////////////////////////////////////////////

int main() {
 ios::sync_with_stdio(false);

ll tt;
cin>>tt;

ll num[550];
  ll dis[550];
for(int i=0;i<=501;i++){
	num[i]=i;
}
  for(int i=0;i<=500;i++){
    dis[i]=i;
  }
rep(qq,tt){
	ll cnt=0;
ll n;
cin>>n;

vector<ll> v;
rep(i,n){
	ll t;
	cin>>t;
	v.pb(t);
}

if(n==1){cout<<0<<endl;
continue;}
if(n==2){
	if(v[0]==1){cout<<0<<endl;}
	else{
		cout<<1<<endl;
		cout<<1<<endl;
	}
	continue;
}

for(ll i=0;i<n;i++){
num[i+1]=v[i];
 dis[v[i]]=i+1;
}

vector<ll> ans;

ll fin=0;
for(ll i=1;i<=n;i++){
if(num[i]==i && i!=n-2)continue;
if(i==n-2){

	while(fin==0){
		cnt++;
	if(cnt%2==n%2){
		ll u=num[n-2];
		     dis[num[n-1]]=n-2;
      dis[num[n-2]]=n-1;
		num[n-2]=num[n-1];
		num[n-1]=u;

		ans.pb(n-2);
	}
	else{
		ll u=num[n-1];
		  dis[num[n-1]]=n;
      dis[num[n]]=n-1;
		num[n-1]=num[n];
		num[n]=u;

		ans.pb(n-1);
	}
if(dis[n-2]==n-2 && dis[n-1]==n-1 && dis[n]==n){fin=1;}

}

}
if(fin==1)break;

while(num[i]!=i){
cnt++;

if(cnt%2==dis[i]%2){
	if(cnt%2==n%2){
		ll u=num[n-2];
		     dis[num[n-1]]=n-2;
      dis[num[n-2]]=n-1;
		num[n-2]=num[n-1];
		num[n-1]=u;

		ans.pb(n-2);
	}
	else{
		ll u=num[n-1];
		  dis[num[n-1]]=n;
      dis[num[n]]=n-1;
		num[n-1]=num[n];
		num[n]=u;

		ans.pb(n-1);
	}

}
else{
ll u=num[dis[i]];
  num[dis[i]]=num[dis[i]-1];
  num[dis[i]-1]=u;
  dis[i]--;
  dis[num[dis[i]+1]]++;

ans.pb(dis[i]);

}

}

}

cout<<cnt<<endl;
for(int i=1;i<ans.size();i++){
	cout<<ans[i-1]<<" ";
}
cout<<ans[cnt-1]<<endl;

}

return 0;
}

#pragma GCC optimize("O3")
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using P=pair<ll,ll>;
template<class T> using V=vector<T>;
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
const ll inf=(1e18);
//const ll mod=998244353;
const ll mod=1000000007;
ll GCD(ll a,ll b) {return b ? GCD(b,a%b):a;}
ll LCM(ll c,ll d){return c/GCD(c,d)*d;}
struct __INIT{__INIT(){cin.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(15);}} __init;
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; }
template<class T>void debag(const vector<T> &a){cerr<<"debag :";for(auto v:a)cerr<<v<<" ";cerr<<"\n";}
template<class T>void print(const vector<T> &a){for(auto v:a)cout<<v<<" ";cout<<"\n";}
//#include <unistd.h>
void solve(){
        int n;
        cin>>n;
        V<int> a(n);
        for(int i=0;i<n;i++){
                cin>>a[i];
                a[i]--;
        }
        int t=0;
        V<int> ans;
        V<bool> ok(n,false);
        while(1){
              bool ok=true;
                for(int j=0;j<n;j++){
                        if(a[j]<j){
                              ok=false;
                               if(j%2==t){
                                      if(t==0){
                                             swap(a[0],a[1]);
                                             ans.emplace_back(1);
                                      }else{
                                            swap(a[1],a[2]);
                                            ans.emplace_back(2);
                                      }
                                      t^=1;
                               }
                               while(a[j]<j){
                                       swap(a[j-1],a[j]);
                                       ans.emplace_back(j);
                                       j--;
                                       t^=1;
                               }
                               break;
                        }
                }
                if(ok)break;
        }
      //  print(a);
        cout<<ans.size()<<"\n";
        print(ans);
}
int main(){
      int t;
      cin>>t;
      while(t--)solve();
}


#include <cstdio>

#define rep(i,_l,_r) for(signed i=(_l),_end=(_r);i<=_end;++i)
#define fep(i,_l,_r) for(signed i=(_l),_end=(_r);i>=_end;--i)
#define erep(i,u) for(signed i=head[u],v=to[i];i;i=nxt[i],v=to[i])
#define efep(i,u) for(signed i=Head[u],v=to[i];i;i=nxt[i],v=to[i])
#define print(x,y) write(x),putchar(y)

template <class T> inline T read(const T sample) {
    T x=0; int f=1; char s;
    while((s=getchar())>'9'||s<'0') if(s=='-') f=-1;
    while(s>='0'&&s<='9') x=(x<<1)+(x<<3)+(s^48),s=getchar();
    return x*f;
}
template <class T> inline void write(const T x) {
    if(x<0) return (void) (putchar('-'),write(-x));
    if(x>9) write(x/10);
    putchar(x%10^48);
}
template <class T> inline T Max(const T x,const T y) {if(x>y) return x; return y;}
template <class T> inline T Min(const T x,const T y) {if(x<y) return x; return y;}
template <class T> inline T fab(const T x) {return x>0?x:-x;}
template <class T> inline T gcd(const T x,const T y) {return y?gcd(y,x%y):x;}
template <class T> inline T lcm(const T x,const T y) {return x/gcd(x,y)*y;}

int n,a[100];
long long ret=(1ll<<31);

int main() {
	n=read(9);
	rep(i,1,n) a[i]=read(9);
	rep(s,0,(1<<n-1)-1) {
		int tmp=0,ans=0;
		rep(i,1,n-1)
			if((s>>i-1)&1) tmp|=a[i],ans^=tmp,tmp=0;
			else tmp|=a[i];
		tmp|=a[n],ans^=tmp;
		if(ret>ans) ret=ans;
	}
	print(ret,'\n');
	return 0;
}

#include<bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
// #define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update>

using namespace std;
#define ll long long int
#define pll pair<ll,ll>
#define vll vector<ll>
#define pi 3.141592653589793238
#define FAST ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define precise(x) fixed<<setprecision(x)
#define mod 1000000007
#define mod2 998244353
#define endl "\n"

ll ans = 1e18;
vll a(50);
ll n;
void recur(ll ind,ll cur,ll net,ll part)
{
        if(ind >= n)
        {
                if(part == 0)
                        return;
                net ^= cur;
                ans = min(ans,net);
                return;
        }
        // take
        recur(ind+1,cur | a[ind],net,part);
        // break
        recur(ind+1,a[ind],net ^ cur,part+1);
}

void solve()
{
        cin >> n;
        for(ll i=0;i<n;i++)
                cin >> a[i];
        recur(0,0,0,0);
        cout << ans;
}int main()
{
    FAST;
    ll q;
    q=1;
    // cin>>q;
    while(q--)
        solve();
    return 0;
}


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

             cout<<max(a,b)-min(c,d);

             return 0;
            }

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

   int A,B,C,d;
   cin>>A>>B>>C;
   d=A*A+B*B;
   if (d<C*C)
   	cout<<"Yes";
   else
   	cout<<"No";

}


#include <bits/stdc++.h>
#define mk make_pair
#define fs first
#define sc second
using namespace std;
typedef long long ll;
typedef long double ld;
// please, read the question correctly (do you need set or multiset)???
const int N=3010; //check the limits, dummy
ll a[N];
int n, m;
ll mod = 1e9+7;
int mem[N][N], mem1[N][N], lst[N][N];
ll dp(int x, int y){
	if(x==n)return 1;
	if(x>n)return 0;
	if(mem[x][y]!=-1)return mem[x][y];
	ll res = 0;
	int tmp = mem1[x][y];
	if(tmp==n){
		res = 1;
	}
	else{
		res = dp(tmp, y+1)+dp(tmp, y);
		res %= mod;
	}
	// cout<<x<<" "<<y<<" "<<tmp<<" "<<res<<endl;
	// for(int i=x; i<n; ++i){
	// 	tmp += a[i];
	// 	tmp %= y;
	// 	if(tmp==0){
	// 		res += dp(i+1, y+1)+dp(i+1, y);
	// 		res %= mod;
	// 		break;
	// 	}
	// }
	mem[x][y] = res;
	return res;
}
int main(){
	scanf("%d",&n);
	for(int i=0; i<n; ++i){
		scanf("%lld",a+i);
	}
	for(int i=1; i<=n; ++i){
		for(int j=0; j<n; ++j){
			lst[i][j] = n+1;
		}
		lst[i][0] = n;
	}
	ll sm = 0;
	for(int i=n-1; i>=0; --i){
		sm += a[i];
		for(int j=1; j<=n; ++j){
			mem1[i][j] = lst[j][(sm%j)];
		}
		for(int j=1; j<=n; ++j){
			lst[j][sm%j] = i;
		}
	}
	memset(mem, -1, sizeof mem);
	ll ans = dp(0,1);
	cout<<ans<<endl;
}

#include <bits/stdc++.h>
using namespace std;
//#define FOR_CODEFORCES
//#define MOD 998244353LL

#if 1 //テンプレ折り畳み//テンプレ折り畳み//テンプレ折り畳み

#ifdef _DEBUG
#define debug() if(true)
#define dout cout
#define dvout(v) __vout(v)
#define dvvout(v) __vvout(v)
#else
#define debug() if (false)
#define dout if (false)cout
#define dvout(v) if(false)__vout(v)
#define dvvout(v) if(false)__vvout(v)
#endif

typedef long long ll;
typedef unsigned long long ull;

#define rep(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)//rep
#define repll(i, n) for(ll i=0, i##_len=(n); i<i##_len; ++i)//rep
#define repi(i, n1, n) for(int i=n1, i##_len=(n); i<i##_len; ++i)//rep
#define reps(i, n) for(int i=1, i##_len=(n); i<=i##_len; ++i)//自然数rep
#define rrep(i, n) for(int i=((int)(n)-1); i>=0; --i)
#define rreps(i, n) for(int i=((int)(n)); i>0; --i)

#define _Yes {cout<<"Yes"<<endl; return;}//出力
#define _No {cout<<"No"<<endl;return;}
#define _ans {cout<<ans<<endl;return;}
#define _endout(s) {cout<<(s)<<endl;return;}

#define vec(v, n) vector<int> v(n, 0);//配列
#define vecll(v, n) vector<ll> v(n, 0);
#define vecvec(v, n, m) vector<vector<int>> v(n, vector<int>(m));
typedef vector<int> vi;
typedef vector<char> vc;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
#define vin(v) for (auto &i : (v)) cin >> i; //配列入力
#define vvin(v) for(auto&i:(v))for(auto&j:i)cin>>j;
#define __vout(v) for(auto&i:(v)){cout<<i<<' ';}cout<<"\n";
#define __vvout(v) for(auto&i:(v)){for(auto&j:i){cout<<j<<' ';}cout<<"\n";}cout<<"\n";

#ifndef MOD
#define MOD 1000000007LL//mod用定数 (ll)(1e9+7)
#endif
#define mod(n) ( ((ll)n) % MOD)
#define modp(n, p) ( ((ll)n) % (ll)(p))
#define modx(A,B) mod(mod(A)*mod(B))
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 next asdnext
#define prev asdprev
#define y0 y3487465
#define y1 y8687969
#define j0 j1347829
#define j1 j234892
#define SZ(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define _n "\n"
#define _n2 "\n\n"
#define _t "\t"

void test();

#endif //テンプレ折り畳み

//	LLONG_MAX 9.2*1e18	9223372036854775807LL = (2^63)-1
//	INT_MAX 2.1*1e9 2147483647 = (2^31)-1
//	O(1e8) 1.2sec

struct ARROW{
	ll a=1,b=0,c=0,d=1,k1=0,k2=0;
};

void Main()
{
	int N;
	cin>>N;
	vll X(N);
	vll Y(N);

	rep(i,N){
		cin>>X[i]>>Y[i];
	}

	int M;
	cin>>M;
	vector<ARROW> ar(M+1);
	reps(i,M){
		int t;
		cin>>t;
		ll p;
		if(t==3 || t==4)cin>>p;

		switch (t)
		{
			case 1:
			ar[i].a=(ar[i-1].c);
			ar[i].b=(ar[i-1].d);
			ar[i].k1=(ar[i-1].k2);

			ar[i].c=-(ar[i-1].a);
			ar[i].d=-(ar[i-1].b);
			ar[i].k2=-(ar[i-1].k1);
			break;

			case 2:
			ar[i].a=-(ar[i-1].c);
			ar[i].b=-(ar[i-1].d);
			ar[i].k1=-(ar[i-1].k2);

			ar[i].c=(ar[i-1].a);
			ar[i].d=(ar[i-1].b);
			ar[i].k2=(ar[i-1].k1);
			break;

			case 3:
			ar[i].a=-(ar[i-1].a);
			ar[i].b=-(ar[i-1].b);
			ar[i].k1=p*2LL - (ar[i-1].k1);
			ar[i].c=(ar[i-1].c);
			ar[i].d=(ar[i-1].d);
			ar[i].k2=(ar[i-1].k2);
			break;

			case 4:
			ar[i].a=(ar[i-1].a);
			ar[i].b=(ar[i-1].b);
			ar[i].k1=(ar[i-1].k1);
			ar[i].c=-(ar[i-1].c);
			ar[i].d=-(ar[i-1].d);
			ar[i].k2=p*2LL - (ar[i-1].k2);
			break;
		}
	}

	int Q;

	cin>>Q;
	rep(i,Q){
		int A,B;
		cin>>A>>B;
		A;B--;
		ll x=(ar[A].a)*X[B] + (ar[A].b)*Y[B] + (ar[A].k1);
		ll y=(ar[A].c)*X[B] + (ar[A].d)*Y[B] + (ar[A].k2);

		dout<<"output  ";
		cout<<x<<" "<<y<<_n;
	}
}

void test(){
}
int main(){
	cin.tie(nullptr);
	ios_base::sync_with_stdio(false);
	cout << std::fixed << std::setprecision(20);
#ifdef FOR_CODEFORCES
	int t = 0;
	cin >> t;
	rep(i, t) Main();
#else
	Main();
#endif
	return 0;
}


#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <sstream>
using namespace std;

typedef long long int lli;

int N1, N2, N3,N4;

vector<string> split(const string& s, char delim) {
    vector<string> elems;
    stringstream ss(s);
    string item;
    while (getline(ss, item, delim)) {
        if (!item.empty()) {
            elems.push_back(item);
        }
    }
    return elems;
}

int main()
{
    string str;
    cin >> str;
    vector<string> ss = split(str, '.');
    cout << ss[0] << endl;

    return 0;
}

#include <iostream>
using namespace std;
#define int long long int
int32_t main() {

    string x;
    cin>>x;

    string ans="";
    for(int i=0;i<x.length();i++)
    {
        if(x[i]=='.')
        {
            break;
        }
        else
        {
            ans+=x[i];
        }
    }
    cout<<ans<<endl;

}


#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;

#define ll 				long long
#define eb 				emplace_back
#define mp              make_pair
#define pb              push_back
#define watch(x) 		cout << (#x) << " = " << (x) << endl;
#define w(x)			int x; cin >> x; while(x--)
#define all(x)          (x.begin(), x.end())
#define fastIO          ios_base::sync_with_stdio(false); cin.tie(nullptr);
#define vi              vector<int>
#define lcm(x, y)       (x/__gcd(x, y))*y
#define sayHi           cout << "Say Hi!!!!!!!!!!!!!!!!!!!!!!!!!\n";
#define rep(i,k,n)      for(int i=k; i<n; i++)
#define REPR(i,k,n) 	for (int (i) = (k); (i) >= (n); (i)--)
#define sumAll(a)       (accumulate ((a).begin(), (a).end(), 0ll))
#define mine(a)         (*min_element((a).begin(), (a).end()))
#define maxe(a)         (*max_element((a).begin(), (a).end()))
#define mini(a)         (min_element((a).begin(), (a).end()) - (a).begin())
#define maxi(a)         (max_element((a).begin(), (a).end()) - (a).begin())
#define lowb(a, x)      (lower_bound((a).begin(), (a).end(), (x)) - (a).begin())
#define uppb(a, x)      (upper_bound((a).begin(), (a).end(), (x)) - (a).begin())
#define mem0(a)         (memset(a, 0, sizeof(a)))
#define mem1(a)         (memset(a, -1, sizeof(a)))
const int MAXN = (int)((1e5) + 100);
const long long MOD = 1e9 + 7;
bool isPrime(ll n){if(n<2)return false;for(ll i=2;i*i<=n; i++){if(n%i==0)return false;}return true;}
int countDigit(ll n){int count=0;while(n!=0){n/=10;++count;}return count;}
void removeCharFromString(string &str,const char &ch){str.erase(remove(str.begin(),str.end(),ch),str.end());}
void showTime() {cerr<<"\nExecution time: "<<(float)clock()/CLOCKS_PER_SEC<<" secs\n";}
long long binExp(long long base,long long pow){
    long long result=1;
    while(pow){
        if(pow%2){result*=base;}
        base*=base;
        pow/=2;
    }
    return result;
}
long long binExpMod(long long base,long long pow,long long M){
    long long result=1;
    while(pow){
        if(pow%2){result=(result*base)%M;}
        base=(base*base)%M;
        pow/=2;
    }
    return result;
}
bool sortBySecAsc(const pair<ll,ll> &a, const pair<ll,ll> &b){
    return (a.second < b.second);
}
bool sortBySecDes(const pair<ll,ll> &a, const pair<ll,ll> &b){
    return (a.second > b.second);
}
/*#ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
#endif*/

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

int main() {
    fastIO

    map<int, string> m;
    w(t) {
        int x;
        string s;
        cin >> s >> x;
        m[x] = s;
    }
    // for(auto i:m) {
    //     cout << i.first << " " << i.second << "\n";
    // }
    auto it = m.end();
    it--; it--;
    cout << it->second;

    return 0;
}

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

#define ll                      long long
#define int                     ll
#define FIO                     ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define ld                      long double
#define ull                     unsigned long long
#define endl                    "\n"
#define fo(i,a,b)               for(int i = a; i<=b ; i++)
#define rfo(i,a,b)              for(int i = a; i>=b ; i--)
#define vii                     vector<int>
#define vll                     vector<ll>
#define pq                      priority_queue
#define uom                     unordered_map
#define all(v)                  v.begin(),v.end()
#define mp                      make_pair
#define pb                      push_back
#define pob                     pop_back
#define ff                      first
#define ss                      second
#define pii                     pair<int,int>
#define mii                     map<int,int>
#define vvii                    vector<vii>
#define mod                     1000000007
#define MIN                     -1e9
#define pi                      3.1415926535897932384626433832795

using namespace std;
using namespace __gnu_pbds;

template<class T> using oset =  tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

void INPUT()
{
#ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
}

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

   -> Check For Overflows
   -> Out of Bounds
   -> Initialisations of global arrays and variables
   -> Read the Question and the sample test cases carefully
   -> Its not Always Complex, Try to simplify
   -> write it down and try to solve
   -> Have Faith in urself and in ur approach
   -> If it seems totally out of reach, switch to next :)
   -> And Come Back later, if possible ..

----------------------------------------------------------------*/
bool cmp(pair<int, int>& a,
         pair<int, int>& b)
{
    return a.ff < b.ff;
}
void solve()
{

  int n,w;
  cin >> n>>w;
  // int a[n];
  // fo(i,0,n-1)
  // cin>>a[i];
  //sort(a,a+n);
  cout<<n/w<<endl;
}
signed main() {

  FIO
  INPUT();

  int t;
  t = 1;
  // cin >> t;

  fo(i, 0, t - 1)
  {
    solve();
  }

  return 0;
}


#include <bits/stdc++.h>
#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 rrep(i, n) for(int i=((int)(n)-1); i>=0; --i)
#define rreps(i, n) for(int i=((int)(n)); i>0; --i)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
using ll = long long;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
void Yes(bool a) { cout << (a?"Yes":"No") << endl; }
void YES(bool a) { cout << (a?"YES":"NO") << endl; }
int MOD = 1e9+7;

int INF = 1000;
int N;

int diff(vector<vector<char>> &genome, string s, int h, int w, int dir) {
	int res = 0;
	if (dir == 0) {
		rep(i, s.size()) {
			if (genome[h][(w+i)%N] != s[i] && genome[h][(w+i)%N] != '.') res++;
		}
	}
	else {
		rep(i, s.size()) {
			if (genome[(h+i)%N][w] != s[i] && genome[(h+i)%N][w] != '.') res++;
		}
	}
	return res;
}

pair<int, int> find(vector<vector<char>> &genome, string s, int dir) {
	int h=-1, w=-1;
	rep(i, N) rep(j, N) {
		bool flag = true;
		if (dir == 0) {
			rep(pos, s.size()) {
				if (genome[i][(j+pos)%N] != s[pos]) flag = false;
			}
		}
		else {
			rep(pos, s.size()) {
				if (genome[(i+pos)%N][j] != s[pos]) flag = false;
			}
		}
		if (flag) {
			h = i;
			w = j;
			break;
		}
	}
	return {h, w};
}

int main(int argc, char **argv) {
	int M; cin >> N >> M;
	vector<vector<char>> genome(N, vector<char>(N, '.'));
	vector<string> s(M);
	rep(i, M) cin >> s[i];
	// sort(ALL(s), [](const string &a, const string &b) {
	// 	return a.size() < b.size();
	// });
	mt19937 r;
	shuffle(ALL(s), r);
	rep(i, s[0].size()) genome[0][i] = s[0][i];
	rep(i, M) {
		int mindiff = INF;
		int h, w, dir;
		rep(j, N) rep(k, N) {
			if (chmin(mindiff, diff(genome, s[i], j, k, 0))) {
				h = j;
				w = k;
				dir = 0;
			}
			if (chmin(mindiff, diff(genome, s[i], j, k, 1))) {
				h = j;
				w = k;
				dir = 1;
			}
		}
		if (mindiff < s[i].size()-1) {
			if (dir == 0) {
				rep(pos, s[i].size()) {
					genome[h][(w+pos)%N] = s[i][pos];
				}
			}
			else {
				rep(pos, s[i].size()) {
					genome[(h+pos)%N][w] = s[i][pos];
				}
			}
		}
	}

	vector<vector<bool>> flag(N, vector<bool>(N, false));
	rep(i, M) {
		rep(j, N) rep(k, N) {
			if (diff(genome, s[i], j, k, 0) == 0) {
				rep(pos, s[i].size()) {
					flag[j][(k+pos)%N] = true;
				}
			}
			if (diff(genome, s[i], j, k, 1) == 0) {
				rep(pos, s[i].size()) {
					flag[(j+pos)%N][k] = true;
				}
			}
		}
	}
	rep(h, N) rep(w, N) {
		if (!flag[h][w]) genome[h][w] = '.';
	}

	rep(h, N) {
		rep(w, N) {
			printf("%c", genome[h][w]);
		}
		printf("\n");
	}
}


#pragma region shig_templates

#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> pairI2;
typedef pair<LL, LL> pairLL2;
typedef vector<int> VI;
typedef vector<LL> VLL;
typedef vector<VI> VVI;
typedef vector<VVI> VVVI;
typedef vector<string> VS;
#define shig_for(i, a, b) for(int i = (a); i < (b); ++i)
#define shig_rep(i, n) shig_for(i, 0, n)
#define shig_forB(bit,a,b) for(int bit = (a); bit < (1<<(b)); ++bit)
#define shig_repB(bit,n) shig_forB(bit,0,n)
#define CINI(a) int (a); cin >> (a)
#define CINLL(a) LL (a); cin >> (a)
#define CINI2(a, b) int a, b; cin >> (a) >> (b)
#define CINLL2(a, b) LL a, b; cin >> (a) >> (b)
#define tmp int temp = 0
#define str string s

template<class T> void COUT(T&& t){ cout << t << endl; }
template<class T,class... Ts>
void COUT(T&& t,Ts&&... ts){ cout << t << " "; COUT(ts...); }
void CIN() {}
template<class T,class... Ts> void CIN(T&& t,Ts&&... ts){ cin >> t; CIN(ts...); }

#pragma endregion

int main(){

    int V, T, S, D;
    CIN(V, T, S, D);

    if(!(D >= T*V && D <= S*V)){
        COUT("Yes");
    }else{
        COUT("No");
    }

    //for(string& s : S) cin >> s;
    //cout << "Atcoder " << N << endl;
    //cout << fixed << setprecision(10) << ans << endl;

    return 0;
}

#include <bits/stdc++.h>

using namespace std;

const long long mod = 1e9 + 7;

long long add(long long a, long long b) {
    long long res = a + b;
    if (res >= mod) res -= mod;
    return res;
}

long long sub(long long a, long long b) {
    long long res = a - b + mod;
    if (res >= mod) res -= mod;
    return res;
}

long long mul(long long a, long long b) {
    return (((a % mod) * (b % mod)) % mod);
}

long long potolok(long long a, long long b){
    return (a + b - 1) / b;
}

long long gcd(long long x, long long y){
    if(y == 0){
        return x;
    }
    if(x == 0){
        return y;
    }
    if(x > y){
         return gcd(y, x % y);
    }
    else{
         return gcd(x, y % x);
    }
}

long long bin_pow(long long base, long long power, long long m){
    if(power == 1){
        return base;
    }
    if(power % 2 == 0){
        long long t = bin_pow(base, power / 2, m);
        return t * t % m;
    }
    else{
        return bin_pow(base, power - 1, m) * base % m;
    }
}

struct segtree{

    int razmer;

    vector<long long> tree;

    void Init(vector<long long> &v){
        int n = (int)v.size();
        razmer = 1;
        while(razmer < n) razmer *= 2;
        tree.assign(2 * razmer - 1, 0);
    }

    void build(vector<long long> &v, int x, int lx, int rx){
        if(rx - lx == 1){
            if(lx < (int)v.size()){
                tree[x] = v[lx];
            }
        }else{
            int m = (lx + rx) / 2;
            build(v, 2 * x + 1, lx, m);
            build(v, 2 * x + 2, m, rx);
            tree[x] = min(tree[2 * x + 1], tree[2 * x + 2]);
        }
    }

    void build(vector<long long> &v){
        build(v, 0, 0, razmer);
    }

    void cet(int i, int v, int x, int lx, int rx){
        if(rx - lx == 1){
            tree[x] = v;
            return;
        }else{
            int m = (lx + rx) / 2;
            if(i < m){
                cet(i, v, 2 * x + 1, lx, m);
            }else{
                cet(i, v, 2 * x + 2, m, rx);
            }
            tree[x] = min(tree[2 * x + 1], tree[2 * x + 2]);
        }
    }

    void cet(int i, int v){
        cet(i, v, 0, 0, razmer);
    }

    long long mn(int l, int r, int x, int lx, int rx){
        if(lx >= r || l >= rx){
            return mod;
        }
        if(lx >= l && rx <= r){
            return tree[x];
        }
        else if(min(rx, r) - max(lx, l) >= 0){
            int m = (lx + rx) / 2;
            long long s1 = mn(l, r, 2 * x + 1, lx, m);
            long long s2 = mn(l, r, 2 * x + 2, m, rx);
            return min(s1, s2);
        }
    }

    long long mn(int l, int r){
        return mn(l, r, 0, 0, razmer);
    }

};

void solve(){
    //std::freopen("stupid_rmq.in", "r", stdin);
    //std::freopen("stupid_rmq.out", "w", stdout);
    //ios_base::sync_with_stdio(false);
    //cin.tie(NULL);
    int V, T, S, D;
    cin >> V >> T >> S >> D;
    if(D >= V * T && D <= V * S){
        cout << "No" << endl;
    }else{
        cout << "Yes" << endl;
    }
}

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


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

#define endl '\n'
#define int long long
#define pow abcdef_pow
#define sqr(x) ((x)*(x))

int pow(int a, int b, int mod) {
  if (b == 0) return 1;
  int t = pow(a, b / 2, mod);
  t = (t * t) % mod;
  if (b % 2) return (t * a) % mod;
  return t;
}

signed main() {
  // freopen("in" , "r", stdin );
  cin.tie(0)->sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  int ans = ((pow(10, n, sqr(m)) - pow(10, n, m) + sqr(m) * sqr(m)) % sqr(m)) / m;
  cout << ans << endl;
}

#include <bits/stdc++.h>

#define isNum(a) (a >= '0' && a <= '9')
#define SP putchar(' ')
#define EL putchar('\n')
#define File(a) freopen(a ".in", "r", stdin), freopen(a ".out", "w", stdout)

template <typename T>
void read(T &);
template <typename T>
void write(const T &);

typedef unsigned uint;
typedef long long ll;
typedef unsigned long long ull;
typedef std::pair<int, int> pii;
const int iinf = 2147483647;
const ll llinf = 9223372036854775807ll;

ll pow(ll a, ll b, ll m);

int main() {
  ll n, m;
  read(n), read(m);
  write(pow(10, n, m * m) / m % m), EL;
  return 0;
}

ll pow(ll a, ll b, ll m) {
  ll ans = 1, now = a;
  while (b) {
    if (b & 1) {
      ans = ans * now % m;
    }
    now = now * now % m;
    b >>= 1;
  }
  return ans;
}

template <typename T>
inline void read(T &Re) {
  T k = 0;
  char ch = getchar();
  int flag = 1;
  while (!isNum(ch)) {
    if (ch == '-') {
      flag = -1;
    }
    ch = getchar();
  }
  while (isNum(ch)) {
    k = (k << 1) + (k << 3) + ch - '0';
    ch = getchar();
  }
  Re = flag * k;
}
template <typename T>
inline void write(const T &Wr) {
  if (Wr < 0) {
    putchar('-');
    write(-Wr);
  } else {
    if (Wr < 10) {
      putchar(Wr + '0');
    } else {
      write(Wr / 10);
      putchar((Wr % 10) + '0');
    }
  }
}


#ifdef _DEBUG
#include "../../../library/src/debug_template.cpp"
#define DMP(...) dump(#__VA_ARGS__, __VA_ARGS__)
#else
#define DMP(...) ((void)0)
#endif

#include <cassert>
#include <cstdio>
#include <cmath>
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <queue>
#include <numeric>
#include <algorithm>
#include <bitset>
#include <functional>

using namespace std;
using lint = long long;
constexpr int MOD = 1000000007, INF = 1010101010;
constexpr lint LINF = 1LL << 60;

struct init {
    init() {
        cin.tie(nullptr);
        ios::sync_with_stdio(false);
        cout << fixed << setprecision(10);
    }
} init_;

int main() {

    lint N, C;
    cin >> N >> C;

    struct dta {
        int a, b, c;
        dta(int a = 0, int b = 0, int c = 0) {}
        bool operator<(dta &r) const { return a < r.a; }
        bool operator>(dta &r) const { return b > r.b; }
    };

    vector<dta> abc(N);
    for (int i = 0; i < N; i++) cin >> abc[i].a >> abc[i].b >> abc[i].c;
    sort(abc.begin(), abc.end());
    //abc.emplace_back(INF, 0, 0);

    lint ans = 0, sum = 0;
    lint now = 0;
    priority_queue<dta, vector<dta>, greater<>> pq;
    for (int i = 0; i < N; i++) {

        ans += min(sum, C) * (abc[i].a - now);
        now = abc[i].a;

        pq.emplace(abc[i]);

        sum += abc[i].c;
        while (!pq.empty() && ((i == N - 1) || abc[i + 1].a > pq.top().b)) {
            ans += min(sum, C) * (pq.top().b - now + 1);
            now = pq.top().b + 1;
            sum -= pq.top().c;
            pq.pop();
        }
        DMP(sum);
    }

    cout << ans << '\n';

    return 0;
}

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

int sx, sy;
int t[50][50], p[50][50];

vector<int> c(2510, 0);

int score = 0, sum = 0;
string ans = "", s = "";

const int dx[4] = {0, 1, 0, -1};
const int dy[4] = {1, 0, -1, 0};
const char mo[4] = {'R', 'D', 'L', 'U'};

void dfs(int x, int y) {
    if(clock() > 1980000) {
        if(sum > score) {
            ans = s;
        }
        return;
    }

    bool f = true;
    if(clock() <= 1000000){
        for(int i = 0; i < 4; ++i) {
            int nx = x+dx[i], ny = y+dy[i];
            if(nx < 0 || nx >= 50 || ny < 0 || ny >= 50) continue;
            if(c[t[nx][ny]]) continue;
            f = false;

            s.push_back(mo[i]);
            c[t[nx][ny]] = 1;
            sum += p[nx][ny];
            dfs(nx, ny);
            s.pop_back();
            c[t[nx][ny]] = 0;
            sum -= p[nx][ny];
        }
    }
    else {
        for(int i = 3; i >= 0; --i) {
            int nx = x+dx[i], ny = y+dy[i];
            if(nx < 0 || nx >= 50 || ny < 0 || ny >= 50) continue;
            if(c[t[nx][ny]]) continue;
            f = false;

            s.push_back(mo[i]);
            c[t[nx][ny]] = 1;
            sum += p[nx][ny];
            dfs(nx, ny);
            s.pop_back();
            c[t[nx][ny]] = 0;
            sum -= p[nx][ny];
        }
    }

    if(f) {
        if(sum > score) {
            ans = s;
            score = sum;
        }
    }
}

int main() {
    cin >> sx >> sy;
    for(int i = 0; i < 50; ++i) {
        for(int j = 0; j < 50; ++j) scanf("%d", &t[i][j]);
    }
    for(int i = 0; i < 50; ++i) {
        for(int j = 0; j < 50; ++j) scanf("%d", &p[i][j]);
    }

    c[t[sx][sy]] = 1;
    dfs(sx, sy);

    cout << ans << endl;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int inf = INT_MAX / 2;
const ll infl = 1LL << 60;
#define rep(i,b) for(ll i=0;i<b;i++)
#define rrep(i,a,b) for(ll i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
///#pragma GCC target("avx2")
///#pragma GCC optimize("O3")
///#pragma GCC optimize("unroll-loops")
ll input(){
    ll  n;
    cin >> n;
    return n;
}///input関数
ll combination(ll n,ll r){
    if (r == 0 || r == n)
        return (1);
    else if (r == 1)
        return (n);
    return (combination(n-1,r-1) + combination(n-1,r));

}///nCr
ll facctorialMethod(ll k){
    ll sum = 1;
    for (ll i = 1; i <= k; ++i)
    {
        sum *= i;
    }
    return sum;
}///階乗
void num_change(ll &a, ll &b){
    swap(a,b);
}
void top3(ll &no1,ll &no2,ll cha){
    if (cha>no2&&cha!=no1)num_change(cha,no2);
    if (no2>no1)num_change(no1,no2);
}
/*
int main() {
    ll n = input();
    vector<ll>num;
    vector<ll>cnt;
    rep(i,n){
        ll a = input();
        bool flag = true;
        rep(j,num.size()){
            if(num.at(j) == a){
                cnt.at(j)++;
                flag = false;
            }
        }
        if (flag){
            num.push_back(a);
            cnt.push_back(1);
        }
    }
    sort(all(cnt));
    reverse(all(cnt));
    ll ans = n * (n-1)/2;
    fore(i,cnt){
        if(i > 1){
            ans -= (i*(i-1)/2);
        }
        if (i==1){
            break;
        }
    }
    cout << ans << endl;
}*/
int main(){
    ll a = input();
    if (a == 191){
        cout << "so-so";
    }else if (a <191){
        cout << "Yay!";
    }else{
        cout << ":(";
    }
}

#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
const int maxn = 5050,mod = 998244353;
int n,m,fac[maxn],ifac[maxn],f[2][maxn];
int read(){
	int x = 0;
	char c = getchar();
	while(c < '0' || c > '9') c = getchar();
	while(c >= '0' && c <= '9') x = x * 10 + (c ^ 48),c = getchar();
	return x;
}
inline int add(int x,int y){
	if(x + y < mod) return x + y;
	else return x + y - mod;
}
int qpow(int x,int k){
	int d = 1;
	while(k){
		if(k & 1) d = 1ll * d * x % mod;
		x = 1ll * x * x % mod,k >>= 1;
	}
	return d;
}
void init(int n){
	fac[0] = 1;
	for(int i = 1; i <= n; i ++) fac[i] = 1ll * fac[i - 1] * i % mod;
	ifac[n] = qpow(fac[n],mod - 2);
	for(int i = n - 1; i >= 0; i --) ifac[i] = 1ll * ifac[i + 1] * (i + 1) % mod;
}
int main(){
	n = read(),m = read();
	init(n);
	int cur = 0;
	f[cur][0] = 1;
	for(int k = 1; k <= m; k <<= 1){
		cur ^= 1;
		for(int i = 0; i <= m; i ++){
			f[cur][i] = 0;
			for(int j = 0; j <= n && j * k <= i; j += 2){
				f[cur][i] = add(f[cur][i],1ll * f[cur ^ 1][i - j * k] * fac[n] % mod * ifac[j] % mod * ifac[n - j] % mod);
				// cout << k << ' ' << i << ' ' << f[cur][i] << endl;
			}
		}
	}
	printf("%d\n",f[cur][m]);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using vin=vector<int>;
using vll=vector<long long>;
using vvin=vector<vector<int>>;
using vvll=vector<vector<long long>>;
using vstr=vector<string>;
using vvstr=vector<vector<string>>;
using vch=vector<char>;
using vvch=vector<vector<char>>;
using vbo=vector<bool>;
using vvbo=vector<vector<bool>>;
using vpii=vector<pair<int,int>>;
using pqsin=priority_queue<int,vector<int>,greater<int>>;
#define mp make_pair
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep2(i,s,n) for(int i=(s);i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define decp(n) cout<<fixed<<setprecision((int)n)
const ll inf=1e9+7;
const ll INF=1e18;
const ll mod=99824453;
vin dx={-1,0,1,0};
vin dy={0,1,0,-1};

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

int main(){
    ll h,w;cin>>h>>w;
    vstr s(h);rep(i,h)cin>>s[i];
    vvin up(h,vin(w)),down(h,vin(w)),right(h,vin(w)),left(h,vin(w));
    int tmp=-1;ll k=h*w;
    rep(i,h){
        tmp=-1;
        rep(j,w){
            left[i][j]=tmp;
            if(s[i][j]=='#'){
                tmp=j;
                k--;
            }
        }
        tmp=w;
        for(int j=w-1;j>=0;j--){
            right[i][j]=tmp;
            if(s[i][j]=='#')tmp=j;
        }
    }
    rep(j,w){
        tmp=-1;
        rep(i,h){
            up[i][j]=tmp;
            if(s[i][j]=='#')tmp=i;
        }
        tmp=h;
        for(int i=h-1;i>=0;i--){
            down[i][j]=tmp;
            if(s[i][j]=='#')tmp=i;
        }
    }
    ll all=modpow((ll)2,k),light,can;
    ll ans=(ll)0;
    rep(i,h)rep(j,w){
        if(s[i][j]=='.'){
            light=(down[i][j]-up[i][j]-(ll)1)+(right[i][j]-left[i][j]-(ll)1)-(ll)1;
            can=all-modpow((ll)2,k-light);
            if(can<0)can+=inf;
            ans+=can;ans%=inf;
        }
    }
    cout<<ans<<endl;
}

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

#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define RFOR(i, b, a) for(int i = (b) - 1; i >= (a); --i)
#define REP(i, N) FOR(i, 0, N)
#define RREP(i, N) RFOR(i, N, 0)
#define FILL(A,value) memset(A,value,sizeof(A))
#define endl '\n'

#define ALL(V) V.begin(), V.end()
#define SZ(V) (int)V.size()
#define watch(x) cout << (#x) << " is " << (x) << endl
#define pb push_back
#define mp make_pair
#define Pi 3.14159265358979
#define A first
#define B second

typedef long long ll;
typedef unsigned long long ull;
typedef vector <int> vi;
typedef vector<ll> vl;
typedef pair <int, int> pi;
typedef pair <ll, int> pl;
typedef pair <ll, ll> pll;
typedef pair <double, double> pd;

//change these according to prob constraints
const int INF = 0x3f3f3f3f;
const int MAX = 100005;
const int MAX1 = 1005;
const int MAX2 = 105;
const int LEN = 105;
const int BASE = 1000000000;
const double EPS = 1e-7;
const int MOD = 1000000007;
//g++ -std=c++11 your_file.cpp -o your_program

ll mypow(ll a, ll b){
	ll ans=1;
	while(b){
		if(b&1)
			ans=(ans*a)%MOD;
		b/=2;
		a=(a*a)%MOD;
	}
	return ans;
}

int main(void){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	ifstream in("");
	ofstream out("");
	clock_t begin = clock();
	int n;
    cin >> n;
    int arr[n];
    REP(i, n){
        cin >> arr[i];
    }
    ll ret = 1e18;
    REP(i, 1 << (n - 1)){
        int curr = arr[0], res = 0;
        REP(j, n - 1){
            if ((i >> j) & 1){
                res ^= curr;
                curr = arr[j + 1];
            }
            else{
                curr |= arr[j + 1];
            }
        }
        res ^= curr;
        ret = min(ret, (ll)res);
    }
    cout << ret << endl;
	clock_t end = clock();
    double esecs = double(end - begin) / CLOCKS_PER_SEC;
    //cout << esecs << " seconds" << endl;
	return 0;
}


#include <algorithm>
#include <iostream>

int main() {
  int a,b,c,d;
  std::cin >> a;
  std::cin >> b;
  std::cin >> c;
  std::cin >> d;

  std::cout << b-c << std::endl;
  return 0;
}

#include <bits/stdc++.h>
#define fi first
#define se second
#define is_in(x,l,r) ((l) <= (x) && (x) < (r))
#define sz(x) (int)(x).size()
#define rng(a) a.begin(),a.end()
#define rngr(a) a.rbegin(),a.rend()
#define uni(x) x.erase(unique(rng(x)),x.end())
#define rep(i,n) for(int i=0; i<(n); i++)
#define rep2(i,x,n) for(int i=x; i<(n); i++)
#define ALL(c) (c).begin(), (c).end()
#define ALLR(c) (c).rbegin(), (c).rend()
#define pb push_back
#define eb emplace_back
using namespace std;
const long long INF = 1LL<<60; // 仮想的な無限大の値;
const int inf = 1<<30;
const double pi = acos(-1);
using ll = long long;
using P  = pair<int, int>;
#define vi vector<int>
#define vvi vector<vi>
#define vll vector<ll>
#define vs vector<string>
#define vp vector<P>
#define vvp vector<vp>
ll gcd(ll x, ll y) { return y ? gcd(y, x % y) : x; }
ll lcm(ll a, ll b){return a * b / gcd(a, b);}
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; }
using CP = complex<double>;
double dot( const CP &z, const CP &w ){ return (z.real()*w.real() + z.imag()*w.imag()); }
double cross( const CP &z, const CP &w ){ return (z.real()*w.imag() - z.imag()*w.real()); }
// #include <atcoder/all>
// using namespace atcoder;
// using mint = modint1000000007;
// const ll mod = 1000000007;
#define dame { puts("-1"); return;}
#define yn {puts("Yes");}else{puts("No");}
int main()
{
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    int ans = max({a-c, a-d, b-c, b-d});
    cout << ans << endl;
    return 0;
}


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

#define repi(i, a, n) for (int i = a; i < (int)(n); ++i)
#define rep(i, n) repi(i, 0, n)
#define all(v) begin(v), end(v)

using ll = long long;

int main() {
  // freopen("1.txt", "rb", stdin);
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);

  int N;
  cin >> N;

  vector<int> F(N + 1);
  F[1] = 1;
  for (int i = 2; i <= N; ++i) {
    int mx = 1;
    for (int j = 1; 1LL * j * j <= i; ++j) {
      if (i % j == 0) {
        mx = max(mx, F[j]);
        mx = max(mx, F[i / j]);
      }
    }

    F[i] = mx + 1;
  }

  for (int i = 1; i <= N; ++i) {
    cout << F[i] << ' ';
  }
  cout << '\n';

  return 0;
}

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
// using namespace std;
#if __has_include(<atcoder/all>)
#include<atcoder/all>
// using namespace atcoder;
#endif
#define int long long

#pragma region header

#pragma region alias

using lint = long long;
using ll = long long;
using P = std::pair<int,int>;
template<class T> using prique = std::priority_queue<T,std::vector<T>,std::greater<T>>;

#pragma endregion

#pragma region macros

#define rep(i, n) for(int i = 0;i<(int)(n);i++)
#define REP(i, m, n) for(int i = (m);i<(int)(n);i++)
#define drep(i, n) for(int i = (n)-1;i>=0;i--)
#define DREP(i, m, n) for(int i = (m)-1;i>=(int)(n);i--)
#define all(v) (v).begin(),(v).end()
#define reall(v) (v).rbegin(),(v).rend()

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

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

std::map<int,int> prime_div(int n) {
    std::map<int,int> mp;
    if(~n&1) while(~n&1) n>>=1,mp[2]++;
    for(int i = 3;i<=std::sqrt(n);i+=2) {
        if(n%i==0) {
            while(n%i==0) {
                n/=i;
                mp[i]++;
            }
        }
    }
    if(n!=1) mp[n]++;
    return mp;
}

#pragma endregion

#pragma region constant

constexpr long long inf = 1LL << 61;
constexpr int dx[9] = {1, 0, -1, 0, 1, 1, -1, -1, 0};
constexpr int dy[9] = {0, 1, 0, -1, 1, -1, 1, -1, 0};
constexpr long long mod = 1e9+7;
constexpr long long MOD = 998244353;

#pragma endregion

#pragma region inout

template<class T>
std::ostream& operator<<(std::ostream& stream, const std::vector<T>& v) {
    for(int i = 0; i < (int)(v.size()); i++) {
        stream << v[i];
        if(i != (int)(v.size()) - 1) stream << ' ';
    }
    return stream;
}

template<typename Itr>
inline void print(const Itr& begin, const Itr& end, bool endline = true, const char* BEGIN = "{", const char* mid = ", ", const char* END = "}") {
    if(begin == end) return;
    std::cout << BEGIN << *begin;
    for(Itr itr = begin+1; itr < end; itr++) std::cout << mid << *itr;
    std::cout << END;
    if(endline) std::endl(std::cout);
    return;
}

template<class T>
std::istream& operator>>(std::istream& stream, std::vector<T>& v) {
    for(T& p:v) stream >> p;
    return stream;
}

template<typename Itr>
inline void input(Itr begin, Itr end) {
    for(Itr& itr = begin; itr < end; itr++) std::cin >> *itr;
    return;
}

template<class T, class U>
std::ostream& operator<<(std::ostream& stream, const std::pair<T,U>& pair) {
    return stream << pair.first << ' ' << pair.second;
}

template<class T, class U>
inline void print(const std::pair<T,U>& pair,const bool endline = true, const char* begin = "(", const char* mid = ", ", const char* end = ")") {
    std::cout << begin << pair.first << mid << pair.second << end;
    if(endline) std::endl(std::cout);
    else std::cout << ' ';
    return;
}

template<class T, class U>
std::istream& operator>>(std::istream& stream, std::pair<T,U>& pair) {
    return stream >> pair.first >> pair.second;
}

template<class T, class U>
inline void input(std::pair<T,U>& pair, const bool first = true, const bool second = true) {
    if(first) std::cin >> pair.first;
    if(second) std::cin >> pair.second;
}

#pragma endregion

#pragma region DEBUG

#ifdef _DEBUG
#define debug(x) {do{std::cout << #x << ": ";view(x);}while(0);}
#else
#define debug(x)
#endif

template<class T> inline void view(const T& x) {
    std::cout << x << std::endl;
}

template<class T> inline void view(const std::vector<T>& v) {
    print(all(v));
}

#pragma endregion

#pragma endregion

signed main() {
    int n;
    std::cin >> n;
    std::vector<int> v(n+1);
    REP(i, 1, n+1) {
        v[i]++;
        for(int j = i*2;j<=n;j+=i) chmax(v[j],v[i]);
    }
    REP(i, 1, n+1) std::cout << v[i] << " \n"[i==n];
    return 0;
}


#include <cstdio>
struct t_Edge {
	int next;
	int to;
	int c;
};
t_Edge edge[400010];
int N, M, a, b, w;
int father[200010];
int head[200010], num_edge;
int vis[200010], ans[200010];
void add(int from, int to, int c)
{
	edge[++num_edge].next = head[from];
	edge[num_edge].to = to;
	edge[num_edge].c = c;
	head[from] = num_edge;
}
int find(int x)
{
	if(father[x]!=x)
	    father[x] = find(father[x]);
	return father[x];
}
void DFS(int u)
{
	for(int i=head[u];i;i=edge[i].next)
	{
		int v = edge[i].to;
		if(vis[v])
		    continue;
		vis[v] = 1;
		if(ans[u]==edge[i].c)
		{
			if(edge[i].c==1)
			    ans[v] = 2;
			else
			    ans[v] = 1;
		}
		else ans[v] = edge[i].c;
		DFS(v);
	}
}
int main()
{
	scanf("%d%d", &N, &M);
	for(int i=1;i<=N;i++)
	    father[i] = i;
	for(int i=1;i<=M;i++)
	{
		scanf("%d%d%d", &a, &b, &w);
		int r1 = find(a), r2 = find(b);
		if(r1==r2)
		    continue;
		father[r2] = r1;
		add(a, b, w);
		add(b, a, w);
	}
	vis[1] = ans[1] = 1;
	DFS(1);
	for(int i=1;i<=N;i++)
	    printf("%d\n", ans[i]);
	return 0;
}

#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#define ll long long
#define ALL(a) (a).begin(),(a).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define Pii pair<int,int>
#define Pll pair<long long,long long>
#define fout(num) cout << fixed << setprecision(20) << (num) << endl
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}
//vector<vector<ll>> dp(n,vector<ll>(n))
//2-dim:vector<vector<Type>> vv(n, vector<Type>(m, d));
//3-dim:vector<vector<vector<Type>>> vvv(n, vector<vector<Type>>(m, vector<Type>(l, d)));

using namespace std;

struct Unionfind{
    vector<int> data;
    Unionfind(int size):data(size, -1) {}
    bool unite(int x, int y){
        x=root(x);
        y=root(y);
        if(x!=y){
            if(data[y] < data[x]) swap(x, y);
            data[x] += data[y];
            data[y] = x;
        }
        return x!=y;
    }
    bool same(int x, int y){
        return root(x) == root(y);
    }
    int root(int x){
        return (data[x] < 0) ? x : data[x]=root(data[x]);
    }
    int size(int x){
        return -data[root(x)];
    }
};

signed main(){
    std::cin.tie(nullptr);
    std::ios_base::sync_with_stdio(false);
    int n,m; cin >> n >> m;
    vector<int> col(n,-1);
    vector<vector<Pii>> G(n);
    Unionfind uni(n);
    vector<int> use(n+1,1);
    rep(i,m){
        int u,v,c; cin >> u >> v >> c;
        u--; v--;
        if(!uni.same(u,v)){
            if(u==0||v==0){
                use[c]=0;
            }
            uni.unite(u,v);
            G[u].push_back({v,c});
            G[v].push_back({u,c});
        }
    }
    queue<int> q;
    q.push(0);
    while(!q.empty()){
        int fr=q.front();
        q.pop();
        for(auto u:G[fr]){
            if(col[u.first]==-1&&u.first!=0){
                if(col[fr]==u.second){
                    if(u.second==n) col[u.first] = u.second-1;
                    else col[u.first] = u.second+1;
                }else col[u.first]=u.second;
                q.push(u.first);
            }
        }
    }
    for(int i=1;i<=n;i++){
        if(use[i]){
            col[0]=i;
            break;
        }
    }
    rep(i,n){
        cout << col[i] << endl;
    }
    return 0;
}
// g++ main.cpp -o main.out && ./main.out


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

#define ll long long
#define pb push_back
#define sz(a) (int)a.size()
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(),v.rend()
#define int long long
const int N = 1e5+10;
struct node{
	int t;
	int k;
};
map<int,node> mp;
bool vis[N];
vector<pair<int,pair<int,int>>> adj[N];
int dist[N];
void solve()
{
	int n,m,x,y;
	cin >> n >> m >> x >> y;
	for(int i= 0;i < m;i++)
	{
		int a,b,c,d;
		cin >> a >> b >> c >> d;
		adj[a].pb({b,{c,d}});
		adj[b].pb({a,{c,d}});
	}
	for(int i = 0;i <=n;i++)
		dist[i]=1e17;
	dist[x] = 0;
	priority_queue<pair<int,int>> q;
	q.push({0,x});
	while(!q.empty())
	{
		int u = q.top().second;
		q.pop();
		if(vis[u])continue;
		vis[u] = true;
		for(auto x : adj[u])
		{
			int v = x.first;
			int t = x.second.first;
			int k=x.second.second;
			int new_dist = ((dist[u] + k-1) / k) * k + t;
			if(dist[v] > new_dist){
				dist[v] = new_dist;
				q.push({-dist[v], v});
			}
		}
	}
	cout << (dist[y]==1e17?-1:dist[y]);
}

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

#include<iostream>
#include<map>
#include<set>
using namespace std;
map<char,int> mp;
string a[3];
long long p[3],k;
set<char> s;
char c[10];
bool b[10],en;
void dfs(int t)
{
	if(en)
	return;
	if(t==k)
	{
		if(mp[a[0][0]]&&mp[a[1][0]]&&mp[a[2][0]])
		{
			for(int i=0;i<3;++i)
			{
				p[i]=0;
				for(int j=0;j<a[i].size();++j)
				p[i]=p[i]*10+mp[a[i][j]];
			}
			if(p[0]+p[1]==p[2])
			{
				en=1;
				cout<<p[0]<<endl<<p[1]<<endl<<p[2]<<endl;
			}
		}
		return;
	}
	for(int i=0;i<10;++i)
	{
		if(!b[i])
		b[i]=1,mp[c[t]]=i,dfs(t+1),b[i]=0;
	}
}
int main()
{
	cin>>a[0]>>a[1]>>a[2];
	for(int i=0;i<3;++i)
	for(int j=0;j<a[i].size();++j)
	s.insert(a[i][j]);
	k=s.size();
	if(k>10)
	{
		cout<<"UNSOLVABLE\n";
		return 0;
	}
	for(int i=0;i<k;++i)
	c[i]=*s.begin(),s.erase(s.begin());
	dfs(0);
	if(!en)
	cout<<"UNSOLVABLE\n";
	return 0;
}


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

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

int to[400001], ne[400001], he[200001];
int Q[200001], pl[200001], dl[200001];

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

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

	int N = getint(), K = getint();
	int k = 1;
	rep(i, N - 1) {
		int u = getint(), v = getint();
		to[k] = v;
		ne[k] = he[u];
		he[u] = k++;
		to[k] = u;
		ne[k] = he[v];
		he[v] = k++;
	}

	int q = 0, p = 0;
	Q[q++] = 1;
	while (p < N) {
		int u = Q[p++];
		int tmp = 0;
		int ind = he[u];
		he[u] = 0;
		while (ind) {
			int v = to[ind];
			tmp = ne[ind];
			if (he[v] > 0) {
				Q[q++] = v;
				ne[ind] = he[u];
				he[u] = -ind;
			}
			ind = tmp;
		}
	}

	int are = 1000000, pd0 = are;
	int L = 0, R = (N + K - 1) / K;
	while (L + 1 < R) {
		int wj = (L + R) / 2;

		int num = 0;

		for (int i = N - 1; i >= 0; i--) {
			int po = pd0 - 1;
			int dd = pd0;
			int u = Q[i];
			for (int ind = -he[u]; ind; ind = -ne[ind]) {
				int v = to[ind];
				if (po < pl[v]) po = pl[v];
				if (dd < dl[v]) dd = dl[v];
			}
			if (po >= dd) dd = 0;
			if (dd >= pd0 + wj) {
				num++;
				po = pd0 + wj;
				dd = 0;
			}
			pl[u] = po - 1;
			dl[u] = dd + 1;
		}

		int are = num + (dl[1] > pd0);
		if (are > K) L = wj;
		else R = wj;

		pd0 += are;
	}

	printf("%d", R);

	Would you please return 0;
}

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int MAXN = 2e5 + 10;
const int MAXM = 2e5 + 10;
const ll INF = 1e18;
struct edge {
    int u,v;
    int next;
}e[MAXM * 2];
int first[MAXN], n, k;
int idx;
void add(int a, int b) {
    e[idx].u = a;
    e[idx].v = b;
    e[idx].next = first[a];
    first[a] = idx++;
}
void init() {
    fill(first, first + n + 1, -1);
    idx = 0;
}
ll f[MAXN], g[MAXN];
int point[MAXN];
int cnt;
void dfs(int u, int fa, int mid) {
    f[u] = -INF;
    g[u] = INF;
    for (int i = first[u]; i != -1; i = e[i].next) {
        int v = e[i].v;
        if (v == fa) continue;
        dfs(v, u, mid);
        f[u] = max(f[u], f[v] + 1);
        g[u] = min(g[u], g[v] + 1);
    }
    if (f[u] + g[u] <= mid) f[u] = -INF;
    if (g[u] > mid) f[u] = max(f[u], 0ll);
    if (f[u] == mid) f[u] = -INF, g[u] = 0, ++cnt;
}
int check(int mid) {
    cnt = 0;
    dfs(1, -1, mid);
    if (f[1] >= 0) cnt++;
    //cout << "cnt:" << cnt << endl;
    return cnt <= k;
}
int main() {
    scanf("%d%d", &n, &k);
    init();
    for (int i = 1; i < n; i++) {
        int u, v;
        scanf("%d%d", &u, &v);
        add(u, v);
        add(v, u);
    }
    int left = 0, right = n;
    int ans = n;
    while (left < right) {
        int mid = (left + right) >> 1;
        //cout << "mid:" << mid << endl;
        if (check(mid)) {
            ans = mid;
            right = mid;
        } else {
            left = mid + 1;
        }
    }
    printf("%d\n", ans);
    return 0;
}


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

int main(){
    int N, Q;
    cin >> N;
    vector<char> S(N), S2(N);
    for(int i=0; i<N; i++){
        cin >> S.at(i);
    }
    for(int i=0; i<N; i++){
        cin >> S2.at(i);
    }
    cin >> Q;
    vector<int> T(Q), A(Q), B(Q);
    for(int i=0; i<Q; i++){
        cin >> T.at(i);
        cin >> A.at(i);
        cin >> B.at(i);
    }

    for(int i=0; i<Q; i++){
        if(T.at(i) == 1){
            if(A.at(i)<=N && B.at(i)<=N){
                swap(S.at(A.at(i)-1), S.at(B.at(i)-1));
            }
            else if(A.at(i)>N && B.at(i)<=N){
                swap(S2.at(A.at(i)-N-1), S.at(B.at(i)-1));
            }
            else if(A.at(i)<=N && B.at(i)>N){
                swap(S.at(A.at(i)-1), S2.at(B.at(i)-N-1));
            }
            else{
                swap(S2.at(A.at(i)-N-1), S2.at(B.at(i)-N-1));
            }
        }
        else{
            swap(S,S2);
        }
    }

    for(int i=0; i<N; i++){
        cout << S.at(i);
    }
    for(int i=0; i<N; i++){
        cout << S2.at(i);
    }

}

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

int main() {
  int N,Q;
  string S,s,t;
  cin >> N >> S >> Q;
  s=S.substr(0,N);
  t=S.substr(N);
  //cout << s << t << endl;
  bool x=true;
  for (int i=0; i<Q; i++) {
      int T,A,B;
      cin >> T >> A >> B;
      A--;B--;
      if (T==1) {
          if (B<N) {
              if (x) swap(s[A],s[B]);
              else swap(t[A],t[B]);
          }
          else if (A>=N) {
              A-=N,B-=N;
              if (x) swap(t[A],t[B]);
              else swap(s[A],s[B]);
          }
          else {
              B-=N;
              if (x) swap(s[A],t[B]);
              else swap(t[A],s[B]);
          }
      }
      else {
          if (x) x=false;
          else x=true;
      }
      //cout << s << t << endl;
  }
  if (x) cout << s << t << endl;
  else cout << t << s << endl;
}


#include<bits/stdc++.h>
#define int long long
using namespace std;
int const MOD=998244353,N=233333;
int n,f[N],vis[N],cnt;
inline int find(int x){
	return x==f[x]?x:f[x]=find(f[x]);
}
inline int qpow(int x,int y){
	return !y?1:qpow(x,y-1)*x%MOD;
}
signed main(){
	ios::sync_with_stdio(0);
	cin>>n;
	for(int i=1;i<=n;i++)f[i]=i;
	for(int i=1;i<=n;i++){
		int x;cin>>x;
		int fx=find(x),fy=find(i);
		if(fx!=fy)f[fx]=fy;
	}
	for(int i=1;i<=n;i++)vis[find(i)]=1;
	for(int i=1;i<=n;i++)cnt+=vis[i];
	cout<<((qpow(2,cnt)+MOD-1)%MOD);
}

#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const int N = 2e5 + 5;
const int mod = 998244353;
int n, a[N], vis[N];
int main() {
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    cin >> n;
    for(int i = 1;i <= n;i++)
        cin >> a[i];
    int ans = 1;
    for(int i = 1;i <= n;i++) {
        int x = i;
        while(vis[x] == 0)
            vis[x] = 1, x = a[x];
        if(vis[x] == 1)
            ans = (ans + ans) % mod;
        x = i;
        while(vis[x] == 1)
            vis[x] = 2, x = a[x];
    }
    ans = (ans + mod - 1) % mod;
    cout << ans;
    return 0;
}


#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
using std::cout;
using std::cin;
using std::endl;
using ll=long long;
using ld=long double;
ll I=1167167167167167167;
ll Q=1e9+7;
#define rep(i,a) for (ll i=0;i<a;i++)
template<class T> using _pq = priority_queue<T, vector<T>, greater<T>>;
template<class T> ll LB(vector<T> &v,T a){return lower_bound(v.begin(),v.end(),a)-v.begin();}
template<class T> ll UB(vector<T> &v,T a){return upper_bound(v.begin(),v.end(),a)-v.begin();}
template<class T> bool chmin(T &a,const T &b){if(a>b){a=b;return 1;}else return 0;}
template<class T> bool chmax(T &a,const T &b){if(a<b){a=b;return 1;}else return 0;}
template<class T> void So(vector<T> &v) {sort(v.begin(),v.end());}
template<class T> void Sore(vector<T> &v) {sort(v.begin(),v.end(),[](T x,T y){return x>y;});}
template<class T> void print_tate(vector<T> &v) {rep(i,v.size()) cout<<v[i]<<"\n";}
void yneos(bool a){if(a) cout<<"Yes"<<"\n"; else cout<<"No"<<"\n";}

//おちこんだりもしたけれど、私はげんきです。
int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);

	ll N;
	cin>>N;
	vector<ll> fib={1,1};
	int k=1;
	while(fib[k]+fib[k-1]<=N){
		fib.push_back(fib[k]+fib[k-1]);
		k++;
	}
	int M=fib.size();
	vector<int> c(M);
	for(int i=M-1;i>0;i--){
		while(N>=fib[i]){
			c[i]++;
			N-=fib[i];
		}
	}
	vector<ll> ans;
	for(int i=1;i<M;i++){
		int a=1,b=4;
		if((M-i)%2==1){
			a=2;
			b=3;
		}
		rep(j,c[M-i]) ans.push_back(a);
		ans.push_back(b);
	}
	cout<<ans.size()<<"\n";
	rep(i,ans.size()){
		cout<<ans[i]<<"\n";
	}

	/*ll X=0,Y=0;
	rep(i,ans.size()){
		if(ans[i]==1) X++;
		if(ans[i]==2) Y++;
		if(ans[i]==3) X+=Y;
		if(ans[i]==4) Y+=X;
		cout<<X<<" "<<Y<<endl;
	}*/
}

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

vector<ll> to_base3(ll n) {
    if(n==0) return vector<ll>{0};
    vector<ll> ret;
    while(n>0) {
        ret.push_back(n%3);
        n/=3;
    }
    return ret;
}
ll subcom(ll a, ll b) {
    if(a==0) {
        if(b==0) return 1;
        return 0;
    }
    if(a==1) {
        if(b==2) return 0;
        return 1;
    }
    else {
        if(b==0 || b==2) return 1;
        return 2;
    }
}
ll com(ll a, ll b) { // Lucasの定理
    if(a<b) return 0;

    ll ret=1;
    auto v=to_base3(a);
    auto w=to_base3(b);
    for(int i=0; i<(int)min(v.size(), w.size()); i++) {
        ret *= subcom(v[i], w[i]);
        ret %= 3;
    }
    return ret;
}

int main() {
    ll n; cin>>n;
    vector<ll> bottom(n);
    rep(i, n) {
        char t; cin>>t;
        if(t=='R') bottom[i]=0;
        else if(t=='B') bottom[i]=1;
        else bottom[i]=2;
    }
    ll ans=0;
    for(int i=0; i<=n-1; i++) {
        ans = (ans+bottom[i]*com(n-1, i))%3;
    }

    if((n-1)%2==1) ans = (3-ans)%3;

    if(ans==0) cout << 'R' << endl;
    else if(ans==1) cout << 'B' << endl;
    else cout << 'W' << endl;
}


//In the name of God
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<ll, ll> pll;

const ll maxn = 1e10;
const ll mod = 1e9 + 7;
const ll inf = 1e18;

#define fast_io ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define file_io freopen("input.txt", "r+", stdin);freopen("output.txt", "w+", stdout);
#define pb push_back
#define Mp make_pair
#define F first
#define S second
#define Sz(x) ll((x).size())
#define all(x) (x).begin(), (x).end()

ll n, vis[3];
string s;

int main(){
    fast_io;

	cin >> n >> s;
	if(s == "1"){
		cout << maxn * 2;
		return 0;
	}
	if(s == "0"){
		cout << maxn;
		return 0;
	}
	if(s == "11"){
		cout << maxn;
		return 0;
	}
	ll x = -1;
	for(ll i = 0; i < n; i++){
		if(s[i] == '0'){
			x = i;
		}
	}
	if(x == -1){
		cout << 0;
		return 0;
	}
	for(ll i = 0; i < n; i++){
		if((s[i] == '0') != (x % 3 == i % 3)){
			cout << 0;
			return 0;
		}
	}
	cout << maxn - (n + (2 - x % 3) + ((x - n) % 3 + 4) % 3) / 3 + 1;

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, s, n) for (ll i = (s); i < (ll)(n); i++)
#define all(v) v.begin(), v.end()
#define sz(v) v.size()
#define INF 100000000000000 //10^14
template <typename T>
bool chmax(T &a, const T& b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
bool chmin(T &a, const T& b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}

struct edge {
  ll to;
};
vector<vector<edge>> graph;

vector<ll> par(1000000);
vector<ll> rnk(1000000);

void init(ll n){
  rep(i, n){
    par.at(i) = i;
    rnk.at(i) = 0;
  }
}

ll root(ll x){
  if(par.at(x) == x){
    return x;
  }
  else{
    par.at(x) = root(par.at(x));
    return par.at(x);
  }
}

bool same(ll x, ll y){
  if(root(x) == root(y)){
    return true;
  }
  else{
    return false;
  }
}

void unite(ll x, ll y){
  x = root(x);
  y = root(y);
  if(x == y){
    return;
  }
  if(rnk.at(x) < rnk.at(y)){
    par.at(x) = y;
  }
  else{
    par.at(y) = x;
    if(rnk.at(x) == rnk.at(y)){
      rnk.at(x)++;
    }
  }
}

int main()
{
    ll N, M;
    cin >> N >> M;
    graph.resize(N);
    init(N);
    vector<ll> a(N);
    rep(i, N) cin >> a.at(i);
    vector<ll> b(N);
    rep(i, N) cin >> b.at(i);
    rep(i, M){
        ll c, d;
        cin >> c >> d;
        c--;
        d--;
        graph.at(c).push_back({d});
        graph.at(d).push_back({c});
        unite(c, d);
    }
    map<ll, ll> s;
    map<ll, ll> g;
    rep(i, N){
        s[root(i)] += a.at(i);
        g[root(i)] += b.at(i);
    }
    rep(i, N){
        if(s.at(root(i)) != g.at(root(i))){
            cout << "No" << endl;
            return 0;
        }
    }
    cout << "Yes" << endl;
}


#include<iostream>

using namespace std;

int main()
{
  int n;
  cin>>n;
  cout<<n-1;
  return 0;
}

#include <iostream>
using namespace std;
unsigned long long div_cnt[2][12] = {0};
int main()
{
  int L;
  cin >> L;
  div_cnt[1][0] = 1;
  for (int i = 1; i < L; i++) {
    for (int j = 0; j < 12; j++) {
      div_cnt[0][j] = div_cnt[1][j];
    }
    for (int j = 1; j < 12; j++) {
      div_cnt[1][j] = div_cnt[0][j-1]+div_cnt[0][j];
    }
  }
  cout << div_cnt[1][11] << endl;
  return 0;
}


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

int main(){
  long long A,B;
  cin >> A >> B;
  vector<long long> V(200001,0);

  for(long long i=A;i<=B;i++){
    V[1]++;
    V[i]++;
    for(long long j=2;j*j<=i;j++){
      if(i%j==0){
        V[j]++;
        if(i/j!=j) V[i/j]++;
      }
    }
  }

  for(int i=200000;;i--){
    if(V[i]>=2){
      cout << i << endl;
      return 0;
    }
  }
  return 0;
}

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <cmath>
#include <stdio.h>
#include <queue>
#include <deque>
#include <cstdio>
#include <set>
#include <map>
#include <bitset>
#include <stack>
#include <cctype>
using namespace std;
int main() {
	int a, b;
	cin >> a >> b;
	int ans = 1;
	for (int i = 1; i <= b; i++) {
		for (int j = 2; j * j <= i; j++) {
			if (i % j == 0) {
				int k = (a + j - 1) / j * j;
				if (k <= b && k + j <= b) {
					ans = max(ans, j);
				}
			}
			if (i % j == 0) {
				int k = (a + (i / j) - 1) / (i / j) * (i / j);
				if (k <= b && k + i / j <= b) {
					ans = max(ans, (i / j));
				}
			}
		}
	}
	cout << ans << endl;
}


#include <iostream>
#include <iomanip>
#include <vector>
#include <map>
#include <algorithm>
#include <string>
#include <numeric>
#include <cmath>
#include <math.h>

#define cPI 3.14159265358979323846
using namespace std;
vector<int64_t> ans;
void func( )
{
    int64_t N;
    cin >> N;
    if (N % 2 == 0)
        cout << "White\n";
    else
        cout << "Black\n";
}

int main() {
//    while (1)
        func();
    return 0;
}

#include<iostream>
using namespace std;
int main()
{int n;
cin>>n;
if(n%2==0)cout<<"White";
if(n%2==1)cout<<"Black";
}


// Problem: D - KAIBUNsyo
// Contest: AtCoder - AtCoder Beginner Contest 206（Sponsored by Panasonic）
// URL: https://atcoder.jp/contests/abc206/tasks/abc206_d
// Memory Limit: 1024 MB
// Time Limit: 2000 ms
//
// Powered by CP Editor (https://cpeditor.org)

// krishrawat

#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;

#define pb insert
#define eb emplace_back
#define ff first
#define ss second
#define all(a) a.begin(), a.end()
#define show(x) cerr << #x << " is " << x << "\n"
#define show2(x, y) cerr << #x << " " << #y << " " << x << " " << y << "\n"
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vl;
typedef pair<ll, ll> pp;
typedef vector<pp> vp;
typedef map<ll, ll> ii;
typedef set<ll> sl;
typedef multiset<ll> msl;
typedef set<pair<ll, ll>> sp;
const ll MOD = 1e9 + 7;
const ll N = 2e5 + 1;
ll mod_mul(ll x, ll y) { return ((x % MOD) * (y % MOD)) % MOD; }
ll mod_add(ll x, ll y) { return ((x % MOD) + (y % MOD)) % MOD; }

ll par[N];
ll sz[N];

ll find_par(ll x) {
  if (par[x] == x) return x;
  return par[x] = find_par(par[x]);
}

void join(ll x, ll y) {
  x = find_par(x);
  y = find_par(y);
  if (x != y) {
    if (sz[y] > sz[x]) swap(x, y);
    sz[x] += sz[y];
    par[y] = x;
  }
}

// main code
void solve() {
  ll n;
  cin >> n;
  vl v(n);
  for (auto &i : v) {
    cin >> i;
    par[i] = i;
    sz[i] = 1;
  }
  ll i = 0, j = n - 1;
  ll ans = 0;
  while (i < j) {
    ll a = v[i];
    ll b = v[j];
    a = find_par(a);
    b = find_par(b);
    if (a != b) {
      ans++;
      join(a, b);
    }
    i++;
    j--;
  }
  cout << ans << "\n";
}

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

#include <bits/stdc++.h>
#define int long long
#define f(i,a,n) for (int i = a; i < n; ++i)
#define fr(i,a,n) for(int i=a;i>=n;i--)
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define all(x) x.begin(), x.end()
#define sortall(x) sort(all(x))
#define fastio ios_base::sync_with_stdio(false), cin.tie(NULL);
#define w1 solve();
#define MOD (int)(1e9 + 7)
#define prq priority_queue
#define gcd __gcd
#define sz(x) (int)x.size()
#define w(t) int t; cin>>t; f(i,1,t+1) {solve(i);}

using namespace std;

#ifdef Avash_Local_Machine
#include "debug.h"
#else
#define debug(x...)
#endif

typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pii> vpi;
typedef vector<string> vs;
typedef vector<char> vc;
typedef vector<bool> vb;

const int INF = (int)(1e17);
const double PI = 3.141592653589793;

int dx[4] = { -1, 0, 1, 0};
int dy[4] = {0, 1, 0, -1};
string path = "URDL";

// #define SIZE (int)(10000)
// vector<int> adj[SIZE];
// vector<pii> adj[SIZE];
// vector<int> vis(SIZE, 0);

int dp[801][801];
int arr[801][801];

void solve(int tc = 1) {
	int n, k;
	cin >> n >> k;
	f(i, 0, n) f(j, 0, n) cin >> arr[i][j];

	int l = 0, r = 1e9;
	int ans = -1;
	while (l <= r)
	{
		int mid = (l + r) / 2;
		f(i, 0, n) f(j, 0, n) {
			if (arr[i][j] <= mid) dp[i][j] = 1;
			else dp[i][j] = 0;
		}

		f(i, 0, n) f(j, 0, n)
		{
			if (i > 0) dp[i][j] += dp[i - 1][j];
			if (j > 0) dp[i][j] += dp[i][j - 1];
			if (i > 0 and j > 0) dp[i][j] -= dp[i - 1][j - 1];

		}

		bool ok = false;

		f(i, k - 1, n)
		{
			f(j, k - 1, n)
			{
				int sum = dp[i][j];
				if (i >= k)sum -= dp[i - k][j];
				if (j >= k)sum -= dp[i][j - k];
				if (i >= k and j >= k)sum += dp[i - k][j - k];

				int x = (k * k) / 2;
				if (k & 1) x++;

				if (sum >= x) {
					ok = true;
					break;
				}

			}

			if (ok == true) break;
		}

		if (ok)
		{
			r = mid - 1;
			ans = mid;
		}
		else l = mid + 1;
	}

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

int32_t main()
{

	fastio
	clock_t begin = clock();
	w1

	clock_t end = clock();
#ifdef Avash_Local_Machine

	cerr << "Executed In: " << double(end - begin) / CLOCKS_PER_SEC * 1000 << " ms\n";
#endif

	return 0;
}


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

#define int long long
#define debug(x) cerr << #x << ": " << x << '\n'
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, n, m) for (int i = (int)(n); i < (int)(m); i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define rALL(obj) (obj).rbegin(), (obj).rend()

using ll = long long;
using ld = long double;
using intp = pair<int, int>;
using intmap = map<int, int>;
using intset = set<int>;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;

constexpr int MOD = 998244353;
constexpr int INF = 1 << 30;
constexpr ll LINF = 1LL << 62;
inline int mod(ll a, int m = MOD) { return (a % m + m) % m; }
inline bool bit(ll b, ll i) { return b & (1 << i); }
inline ll ceiv(ll a, ll b) { return (a + b - 1) / b; }
template<class T> bool chmin(T &a, T b) {if(a > b){a = b; return 1;} return 0;}
template<class T> bool chmax(T &a, T b) {if(a < b){a = b; return 1;} return 0;}

signed main() {
    int x; cin >> x;
    cout << (x < 0 ? 0 : x) << endl;
}

#include <iostream>
using namespace std;

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

    if (x >= 0)
    {
        cout << x << endl;
    }
    else
    {
        cout << 0 << endl;
    }

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long int ll;
typedef pair<ll, ll> pll;

#define FOR(i, n, m) for(ll (i)=(m);(i)<(n);++(i))
#define REP(i, n) FOR(i,n,0)
#define OF64 std::setprecision(40)

const ll MOD = 1000000007;
const ll INF = (ll) 1e15;

bool solve(vector<ll> &A) {
    ll N = A.size();
    vector<ll> ans;
    REP(i, N * N) {
        bool sorted = true;
        REP(j, N - 1) {
            if (A[j] > A[j + 1]) {
                sorted = false;
                break;
            }
        }
        if (sorted)
            break;
        bool update = false;
        REP(j, N) {
            if (i % 2 != j % 2)
                continue;
            if (j + 1 >= N)
                break;
            if (A[j] > A[j + 1]) {
                update = true;
                swap(A[j], A[j + 1]);
                ans.push_back(j);
                break;
            }
        }
        if (!update) {
            for (ll j = N - 2; j >= 0; --j) {
                if (j % 2 == i % 2) {
                    swap(A[j], A[j + 1]);
                    ans.push_back(j);
                    break;
                }
            }
        }
#if false
        REP(j, N) {
            cout << A[j] << " ";
        }
        cout << endl;
#endif
    }

    cout << ans.size() << endl;
    REP(i, ans.size()) {
        cout << ans[i] + 1 << " ";
    }
    cout << endl;
    {
        bool sorted = true;
        REP(j, N - 1) {

            if (A[j] > A[j + 1]) {
                sorted = false;
                break;
            }
        }
        return sorted;
    }
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
#if true
    ll Q;
    cin >> Q;
    REP(_, Q) {
        ll N;
        cin >> N;
        vector<ll> A(N);
        REP(i, N) {
            cin >> A[i];
        }
        if (!solve(A)) {
            assert(false);
        }
    }
#else
    vector<ll> A;
    ll N = 8;
    REP(i, N) {
        A.push_back(i + 1);
    }
    do {
        vector<ll> v;
        REP(i, N) {
            v.push_back(A[i]);
        }
        if (!solve(v)) {
            assert(false);
        }
    } while (next_permutation(A.begin(), A.end()));
#endif
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
  enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c* x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug {
#ifdef LOCAL
~debug() { cerr << endl; }
eni(!=) cerr << boolalpha << i; ris; }
eni(==) ris << range(begin(i), end(i)); }
sim, class b dor(pair < b, c > d) {
  ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d) {
  *this << "[";
  for (auto it = d.b; it != d.e; ++it)
	*this << ", " + 2 * (it == d.b) << *it;
  ris << "]";
}
#else
sim dor(const c&) { ris; }
#endif
};
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

#define x first
#define y second
int main() {
	int n;
	cin >> n;
	vector<pair<int, int>> v(n);
	for (int i = 0; i < n; ++i) {
		cin >> v[i].first >> v[i].second;
	}
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < n; ++j) {
			if (i == j) continue;
			for (int k = 0; k < n; ++k) {
				if (k == j) continue;
				if (k == i) continue;
				if ((v[j].x - v[i].x) * (v[k].y - v[i].y) == (v[j].y - v[i].y) * (v[k].x - v[i].x)) {
					cout << "Yes\n";
					return 0;
				}
			}
		}
	}
	cout << "No\n";
}


#include<bits/stdc++.h>
#define LL long long
using namespace std;
LL A=-1e16,B=1e16,C,a;
int n,q,t;
int main(){
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		scanf("%lld%d",&a,&t);
		if(t==1){
			A+=a;
			B+=a;
			C+=a;
		}
		else if(t==2){
			A=max(A,a);
			B=max(B,a);
		}
		else {
			A=min(A,a);
			B=min(B,a);
		}
	}
	scanf("%d",&q);
	while(q--){
		scanf("%lld",&a);
		printf("%lld\n",min(B,max(A,a+C)));
	}
	return 0;
}

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

ll dp[2][1 << 21];

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    LL(a, b);
    ll d = b - a + 1;
    vi p;
    rep(i, 2, d + 1) {
        bool ok = true;
        rep(j, 2, i) if (i % j == 0) ok = false;
        if (ok) p.pb(i);
    }
    int sz = p.size();
    dp[0][0] = 1;
    debug(p);
    rep(i, d) {
        ll now = a + i;
        int bit = 0;
        rep(k, sz) {
            if (now % p[k]) continue;
            bit |= 1 << k;
        }
        rep(j, 1 << sz) {
            if (dp[0][j] == 0) continue;
            dp[1][j] += dp[0][j];
            if ((bit & j) == 0) dp[1][bit | j] += dp[0][j];
            dp[0][j] = 0;
        }
        swap(dp[0], dp[1]);
    }
    ll ans = 0;
    rep(i, 1 << sz) ans += dp[0][i];
    print(ans);
}


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

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

using vi = vector<int>;
using vl = vector<ll>;
using vc = vector<char>;
using vd = vector<double>;
using vs = vector<string>;
using vp = vector<P>;
using vb = vector<bool>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;
using vvd = vector<vector<double>>;
using vvc = vector<vector<char>>;
using vvp = vector<vector<P>>;
using vvb = vector<vector<bool>>;
template <typename T>
bool chmax(T& a, const T b) { if (a < b) { a = b; return true; } return false; }
template <typename T>
bool chmin(T& a, const T b) { if (a > b) { a = b; return true; } return false; }

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

int main(){
    int n,m;
    cin>>n>>m;
    vvi e(n);
    rep(i,m){
        int a,b;
        cin>>a>>b;
        --a,--b;
        e[a].push_back(b);
    }
    vi ans(n);
    rep(i,n){
        queue<int>q;
        q.push(i);
        vi used(n);
        used[i]=1;
        while(q.size()){
            int now=q.front();q.pop();
            for(int to : e[now]){
                if(used[to])continue;
                q.push(to);
                ans[i]++;
                used[to]=1;
            }
        }
    }
    int sum=0;
    rep(i,n)sum+=ans[i];
    cout<<sum+n<<endl;
    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;

#define  pb push_back
#define inf 1e18
// 1000000007 , 998244353
// cout<<"? "<<endl for interactive

#define MOD 998244353
#define  mp make_pair
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define clr(x,y,z) (x).clear(),(x).resize((y),(z))

typedef long long int lli;
typedef vector<lli> vli;
typedef vector<int> vi;
typedef tuple<int, int, long long int>tup;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<lli, lli> pll;
typedef pair<int, int> pii;

#define csb(x) __builtin_popcount(x)
#define clz(x) __builtin_clz(x)
#define ctz(x) __builtin_ctz(x)
#define clin(x,n,m) x>=n*m||x<0||(x%m==0 && j==2) || (x%m==m-1 && j==3)
#define cgrid(x,y,n,m) x>=n||y>=m||x<=0||y<=0
#define PI 3.1415926535897932384626

// #define deb(x) cout << #x << " = " << x << endl;
#define deb(...) logger(#__VA_ARGS__, __VA_ARGS__)
#define show(x) {for( auto i : x) cout << i << '\t'; cout << endl;}
#define show2(x,l1,l2) {for( int i=0;i<l1;i++){for(int j=0;j<l2;j++) cout << x[i][j] << '\t'; cout << endl;}}
#define rep(i,st,ed) for(int i=(st);i<(ed);i++)
#define rrep(i,ed,st) for(int i=ed;i>=st;i--)
#define ff first
#define ss second
#define minheap(type) priority_queue<type,vector<type>,greater<type>>
#define sze(x) (int)x.size()
#define rgenerate mt19937 rgen(chrono::high_resolution_clock::now().time_since_epoch().count())
#define indexed_set tree<lli,null_type,less<lli>,rb_tree_tag,tree_order_statistics_node_update>
#define yes cout<<"YES\n"
#define no cout<<"NO\n"

template <typename T> void ckmin(T &a, const T &b) { a = min(a, b); }
template <typename T> void ckmax(T &a, const T &b) { a = max(a, b); }
template<typename ...Args>void logger(string vars, Args&&... values) {cout << vars << " = "; string delim = ""; (..., (cout << delim << values, delim = ", ")); cout << "\n";}

long long gcd(ull a, ull b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
void sieve(vector<int>&spf) {int n = spf.size(); rep(i, 2, n) {if (!spf[i]) {/*prime.pb(i);*/ for (int j = i; j < n; j += i) spf[j] = i; }}}
lli power(lli x, lli y, long long int m = MOD) { lli ans = 1; x %= m; while (y) {if (y & 1)ans = (x * ans) % m; x = (x * x) % m; y >>= 1;} return ans;}
lli ncr(vli&fact, int n, int r) {return (n >= r) ? ((fact[n] * ((power(fact[r], MOD - 2) * power(fact[n - r], MOD - 2) ) % MOD)) % MOD) : 0;}

int add(int x, int y) {x += y; while (x >= MOD) x -= MOD; while (x < 0) x += MOD; return x;}
int mul(int x, int y) {return (x * 1ll * y) % MOD;}
int divide(int x, int y) {return mul(x, power(y, MOD - 2));}

// int dx[] = {1, -1, 0, 0};
// int dy[] = {0, 0, 1, -1};
// int dl[] = {m, -m, 1, -1};

vector<vi>adj;
vector<bool>visited;
int sz=0;
void dfs(int c){
    visited[c]=true;
    sz++;
    for(int i=0;i<adj[c].size();i++){
        int nxt =adj[c][i];
        if(visited[nxt])continue;
        dfs(nxt);
    }
}

void solve() {

    int n,m;
    cin>>n>>m;

    adj.resize(n);
    visited.assign(n,false);
    rep(i,0,m){
        int f,t;
        cin>>f>>t;
        f--,t--;
        adj[f].pb(t);
    }

    int ans=0;
    rep(i,0,n){
        sz=0;
        dfs(i),ans+=sz;
        rep(j,0,n)visited[j]=false;
    }

    cout<<ans;

}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int z = 1;
    // cin >> z;

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

}