#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
using namespace std;
#define ll long long
#define ull unsigned long long
#define dl double long
const int INF = 0x3fffffff;
const ll MOD = 1000000007;
const ll MODD = 998244353;
#define rrep(i,n) for(ll i=(ll)(n)-1;i>=0;i--)
#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)
#define rep(i,n) REP(i,0,n)
template<typename T> bool chmax(T &m, const T q) { if (m < q) { m = q; return true; } else return false; }
template<typename T> bool chmin(T &m, const T q) { if (m > q) { m = q; return true; } else return false; }
ll gcd(ll a, ll b) { return (b > 0) ? gcd(b, a%b) : a; }
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
using ipair = pair<ll, ll>;

int main()
{
	ll r1, c1, r2, c2;
	cin >> r1 >> c1 >> r2 >> c2;
	ll r = r2 - r1;
	ll c = c2 - c1;
	ll ans = 3;
	if (!r && !c) ans = 0;
	else if (r == c || r == -c || abs(r) + abs(c) <= 3) ans = 1;
	else if ((r ^ c ^ 1) & 1 || abs(r + c) <= 3 || abs(r - c) <= 3 || abs(r) + abs(c) <= 6) ans = 2;
	cout << ans << endl;
}

#include "bits/stdc++.h"
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// using namespace __gnu_pbds;
using namespace std;
#define int long long int
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define vi vector <int>
#define ff first
#define ss second
#define vp vector <pair<int,int>>
#define vpp vector <pair<int,pair<int,int>>>
#define seti set<int>
#define setbit(x) __builtin_popcountll(x)
#define sov(v) accumulate(all(v),0)
#define fs(it,a) for(auto it=a.begin();it!=a.end();it++)
#define pb push_back
#define pob pop_back
#define mp make_pair
#define pqmax priority_queue <int,vector <int>>
#define pqmin priority_queue <int,vector <int>,greater<int>>
#define dq deque <int>
#define umi unordered_map<int,int>
#define ums unordered_map<string,int>
#define sp(x,y) fixed << setprecision(y) << x
#define all(x) x.begin(),x.end()
#define f(x,y,z) for(x=y;x<z;x++)
#define si size()
#define countdigit(x) floor(log10(x) +1)
#define M 1000000007
#define Z 998244353
#define fill(arr,x) memset(arr,x,sizeof(arr))
//Use (k%M+m)%m always where k is any no
#define PI 3.1415926535
#define lcm(a,b)  a*b/(__gcd(a,b))
// typedef tree<int, null_type, less<int>, rb_tree_tag,
// tree_order_statistics_node_update> pdbs;
// // null for set,mapped_type for map;
// //less for assending greater for descending
//ceil(a/b)=(a+b-1)/b
// v.si-1 can never be negative
#define ghadi() cerr<<"\nTime Taken : "<<(float)(clock()-time_p)/CLOCKS_PER_SEC<<"\n";
clock_t time_p=clock();
#define ee "\n"
#define re return

//Author Rahul Sannigrahi

vector<int> take(int n)
{
    int i,j;
    vi v;
    f(i,0,n)
    {
        cin>>j;
        v.pb(j);
    }
    return v;
}

int power(int x,int y)
{
    int res=1;

    while(y>0)
    {
       if(y&1)
       res=((res%M)*(x%M))%M;

       y=y>>1;
       x=((x%M)*(x%M))%M;
    }
    re res;
}

bool sortinrev(const pair<int,int> &a,  //desc of vp
               const pair<int,int> &b)
{
       return (a.first > b.first);
}

void show(vector<int>v)
{
    int i;
    for(i=0;i<v.si;i++)
    {
     cout<<v[i]<<" ";
    }
    cout<<ee;
}

int decode()
{
    int  i,j,k,l,n,m,s,t,v,d;
    cin>>v>>t>>s>>d;
   if(v*t<=d and d<=v*s)
   cout<<"No"<<ee;
   else
   cout<<"Yes"<<ee;
   re 0;
}

int32_t main()
{
    IOS
    // #ifndef ONLINE_JUDGE
    // freopen("input.txt","r",stdin);
    //  freopen("output.txt","w",stdout);
    // #endif

    int t=1;
  //  cin>>t;
    while(t--)
    decode();
    return 0;
}


#include<bits/stdc++.h>
#define db double
#define il inline
#define iL (1<<20)
#define re register
#define ll long long
#define ui unsigned int
#define ull unsigned long long
#define TEM template<class T>il void
#define Write(x,LC) write((x)),*iter++=LC
#define Writeneg(x,LC) writeneg((x)),*iter++=LC
#define flush() fwrite(Out,1,iter-Out,stdout),iter=Out
#define gc() ((iS==iT)?(iT=(iS=ibuf)+fread(ibuf,1,iL,stdin),(iS==iT)?EOF:*iS++):*iS++)
using namespace std;
namespace IO{
  char ibuf[iL],*iS=ibuf+iL,*iT=ibuf+iL,Out[iL],*iter=Out;
  TEM Readneg(re T &x){re char c;re bool f;for(f=false,c=getchar();!isdigit(c);f|=c=='-',c=getchar());for(x=0;isdigit(c);x=(x<<1)+(x<<3)+(c^48),c=getchar());if(f)x=~x+1;}
  TEM readneg(re T &x){re char c;re bool f;for(f=false,c=gc();!isdigit(c);f|=c=='-',c=gc());for(x=0;isdigit(c);x=(x<<1)+(x<<3)+(c^48),c=gc());if(f)x=~x+1;}
  TEM writeneg(re T x){if(x<0)*iter++='-',x=~x+1;re T c[35],l;for(l=0;!l || x;c[l]=x%10,++l,x/=10);for(;l;--l,*iter++=c[l]+'0');flush();}
  TEM Read(re T &x){re char c;for(c=getchar();!isdigit(c);c=getchar());for(x=0;isdigit(c);x=(x<<1)+(x<<3)+(c^48),c=getchar());}
  TEM read(re T &x){re char c;for(c=gc();!isdigit(c);c=gc());for(x=0;isdigit(c);x=(x<<1)+(x<<3)+(c^48),c=gc());}
  TEM write(re T x){re T c[35],l;for(l=0;!l||x;c[l++]=x%10,x/=10);for(;l;*iter++=c[--l]+'0');flush();}
}
using namespace IO;
#define MAXN 105
#define MAXA 1005
int n,a[MAXN],b[MAXN],ton[MAXA];
int main(){
  cin>>n;
  for(re int i=1;i<=n;++i)cin>>a[i];
  for(re int i=1;i<=n;++i)cin>>b[i];
  for(re int i=1;i<=n;++i){
    for(re int j=a[i];j<=b[i];++j){
      ++ton[j];
    }
  }
  int ans=0;
  for(re int i=1;i<MAXA;++i){
    if(ton[i]==n){
      ++ans;
    }
  }
  cout<<ans;
}

#define LOCAL
#define _USE_MATH_DEFINES
#include <array>
#include <cassert>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>
#include <vector>
#include <queue>
#include <stack>
#include <list>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>
#include <complex>
#include <cmath>
#include <numeric>
#include <bitset>
#include <functional>
#include <random>
#include <ctime>

using namespace std;

template <typename A, typename B>
ostream& operator <<(ostream& out, const pair<A, B>& a) {
  out << "(" << a.first << "," << a.second << ")";
  return out;
}
template <typename T, size_t N>
ostream& operator <<(ostream& out, const array<T, N>& a) {
  out << "["; bool first = true;
  for (auto& v : a) { out << (first ? "" : ", "); out << v; first = 0;} out << "]";
  return out;
}
template <typename T>
ostream& operator <<(ostream& out, const vector<T>& a) {
  out << "["; bool first = true;
  for (auto v : a) { out << (first ? "" : ", "); out << v; first = 0;} out << "]";
  return out;
}
template <typename T, class Cmp>
ostream& operator <<(ostream& out, const set<T, Cmp>& a) {
  out << "{"; bool first = true;
  for (auto& v : a) { out << (first ? "" : ", "); out << v; first = 0;} out << "}";
  return out;
}
template <typename U, typename T, class Cmp>
ostream& operator <<(ostream& out, const map<U, T, Cmp>& a) {
  out << "{"; bool first = true;
  for (auto& p : a) { out << (first ? "" : ", "); out << p.first << ":" << p.second; first = 0;} out << "}";
  return out;
}
#ifdef LOCAL
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
#else
#define trace(...) 42
#endif
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
  cerr << name << ": " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << ": " << arg1 << " |";
  __f(comma + 1, args...);
}

template <class T> auto vect(const T& v, int n) { return vector<T>(n, v); }
template <class T, class... D> auto vect(const T& v, int n, D... m) {
  return vector<decltype(vect(v, m...))>(n, vect(v, m...));
}

typedef long long int64;
typedef pair<int, int> ii;
#define SZ(x) (int)((x).size())
template <typename T> static constexpr T inf = numeric_limits<T>::max() / 2;
const int MOD = 1e9 + 7;
mt19937 mrand(random_device{}());
int rnd(int x) { return mrand() % x; }
template <class T> void out(const vector<T>& a) { for (int i = 0; i < SZ(a); ++i) cout << a[i] << " \n"[i + 1 == SZ(a)]; }

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

int main() {
  int n;
  cin >> n;
  string s;
  cin >> s;
  if (s[0] != s[n - 1]) {
    cout << 1 << '\n';
    return 0;
  }
  vector<int> a;
  for (int i = 0; i < n; ++i) {
    if (s[i] != s[0]) a.push_back(i);
  }
  bool found = false;
  for (int i = 1; i < SZ(a); ++i) {
    if (a[i - 1] + 1 == a[i]) found = true;
  }
  cout << (found ? 2 : -1) << '\n';
  return 0;
}


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

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

char win(char a, char b) {
	if (a == b)return a;
	if ((a == 'R'&&b == 'S') || (a == 'S'&&b == 'P') || (a == 'P'&&b == 'R')) {
		return a;
	}
	return b;
}

signed main(void) {
	int n, k;
	string s;
	cin >> n >> k >> s;
	rep(i, k) {
		if (s.size() % 2 == 1) {
			s += s;
		}
		string buf = "";
		rep(j, s.size() / 2) {
			buf += win(s[2 * j], s[2 * j + 1]);
		}
		s = buf;
	}
	cout << s[0] << endl;
}

#include<bits/stdc++.h>
using namespace std;
#define int long long
#define M 1000000007
#define INF ((1LL<<62LL) - 1)

int n,k;

char win(char x, char y){
    string gg = "RSP";

    if(x == y) return x;

    for(int i=0;i<3;i++){
        if(gg[i] == x && gg[(i+1)%3] == y) return x;
        if(gg[i] == y && gg[(i+1)%3] == x) return y;
    }
    return x;
}

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

    int temp = po(a, b/2);
    temp *= temp;
    temp%=n;

    if(b&1) temp*=a;
    temp%=n;

    return temp;
}

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

    cin >> n >> k;
    string s; cin >> s;

    char ans[n+1][k+1];

    for(int i=0;i<n;i++){
        ans[i][0] = s[i];
    }

    for(int j = 1;j<=k;j++){
        //cout << j << "\n";
        for(int left = 0;left<n;left++){
            int right = left + po(2, j-1);
            right%=n;

            ans[left][j] = win(ans[left][j-1], ans[right][j-1]);

            //cout << left << " " << right << "   " <<  ans[left][j] << " won in " << ans[left][j-1] << " " << ans[right][j-1] << "\n";
        }
        //cout << "\n";
    }

    cout << ans[0][k] << "\n";

}


#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n - 1; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i <= n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v + n)
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
using P = pair<ll, ll>;
using Graph = vector<vector<int>>;
using Edge = pair<int, ll>;
const ll INF = 1LL << 60;
const int MAX = 100000;
const int MOD = 1000000007;

int main()
{
    // cin高速化
    cin.tie(0);
    ios::sync_with_stdio(false);
    char c;
    int a = 0, b = 0;

    REP(i, 10)
    {
        cin >> c;
        if (c == 'o')
        {
            ++a;
        }
        else if (c == '?')
        {
            ++b;
        }
    }
    int ans = 0;
    // oが多すぎorxが多すぎ
    if (a > 4 || a + b == 0)
    {
        cout << ans << "\n";
        return 0;
    }
    if (a == 4)
        ans = 4 * 3 * 2;
    if (a == 3)
        ans = 3 * 2 * (b + 3) + 3 * 2 * (b + 2) + 3 * 2 * (b + 1) + 3 * 2 * b;
    if (a == 2)
        ans = 2 * (b + 2) * (b + 2) + 2 * (b + 1) * (b + 2) + 2 * (b + 1) * (b + 1) + 2 * b * (b + 2) + 2 * b * (b + 1) + 2 * b * b;
    if (a == 1)
        ans = (b + 1) * (b + 1) * (b + 1) + b * (b + 1) * (b + 1) + b * b * (b + 1) + b * b * b;
    if (a == 0)
        ans = b * b * b * b;
    cout << ans << "\n";
    return 0;
}

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

char status[12];
int main(){
	scanf("%s",status);

	int ans=0;
	for(int num=0; num<=9999; num+=1){
		vector<bool> on(10);
		for(int x=num, t=0; t<4; t++,x/=10)
			on[x%10]=1;
		bool safe=true;
		for(int i=0; i<=9; i+=1)
			if((status[i]=='o' and on[i]==0) or (status[i]=='x' and on[i]))
				safe=false;
		ans+=safe;
	}
	printf("%d\n",ans);
}


#include<iostream>
#include<string>
using namespace std;
int main(){
	string str;
	bool flag=false;
	cin>>str;
	for(int i=0;i<str.length();++i){
		if((i+1)%2!=0){
			if(str[i]>=97 && str[i]<=122){
				continue;
			}
			else{
				cout<<"No\n";
				flag=true;
				break;
			}
		}
		else{
			if(str[i]>=65 && str[i]<=90){
				continue;
			}
			else{
				cout<<"No\n";
				flag=true;
				break;
			}
		}
	}
	if(!flag) cout<<"Yes\n";
	return 0;
}

/*include&using-----------------------------------------------------------------------*/
#include <bits/stdc++.h>
using namespace std;
/*debug-------------------------------------------------------------------------------*/
#define _GLIBCXX_DEBUG
#ifdef _DEBUG
#define debug(...) COUT(__VA_ARGS__)
#else
#define debug(...)
#endif
/*typename----------------------------------------------------------------------------*/
template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;
template <class T> using P = pair<T,T>;
template <class T> using M = map<T,T>;
template <class T> using S = set<T>;
template <class T> using PQ = priority_queue<T>;
template <class T> using PQG = priority_queue<T,V<T>,greater<T>>;
using ll = long long;
using st = string;
using vl = V<ll>;
using vvl = V<V<ll>>;
using vc = V<char>;
using vvc = V<V<char>>;
using vs = V<st>;
using vvs = V<V<st>>;
using vb = V<bool>;
using vvb = V<V<bool>>;
/*constant----------------------------------------------------------------------------*/
const ll INF = 1e9;
const ll MOD = 1e9+7;
const vl dx = {1,0,-1,0,1,0,-1,0};
const vl dy = {0,1,0,-1,0,1,0,-1};
/*macro-------------------------------------------------------------------------------*/
#define re(n) for(ll _ = 0; _ < (ll) n; _++)
#define rep(i,n) for(ll i = 0; i < (ll) n; i++)
#define rrep(i,n) for(ll i = (ll) n - 1; i >= 0;i--)
#define repp(i,x,n) for(ll i = (ll) x; i < (ll) n; i++)
#define bitrep(i,n) for(ll i = 0; i < (1<<(ll)n); i++)
#define each(x,A) for(auto &(x): (A))
#define all(A) A.begin(), A.end()
#define len(A) ll(A.size())
#define pb(a) push_back(a)
#define mp make_pair
#define pc cout << setprecision(15) << fixed
/*input-------------------------------------------------------------------------------*/
void CIN(){}
template <class Head,class... Tail>
void CIN(Head&& h,Tail&&... t){cin>>h; CIN(t...);}
#define CINL(...) ll __VA_ARGS__;CIN(__VA_ARGS__)
#define CINS(...) string __VA_ARGS__;CIN(__VA_ARGS__)
#define CIND(...) double __VA_ARGS__;CIN(__VA_ARGS__)
/*output------------------------------------------------------------------------------*/
void COUT(){cout << endl;}
template <class Head, class... Tail>
void COUT(Head h, Tail... t){cout << h << " "; COUT(t...);}
/*function----------------------------------------------------------------------------*/
void Yes(bool ans){cout << (ans? "Yes" : "No") << endl;}
void YES(bool ans){cout << (ans? "YES" : "NO") << endl;}
template <class T> T ceil(T a,T b){return (a+b-1)/b;}
template <class T> void chmax(T &a, const T& b){if(a<b){a=b;}}
template <class T> void chmin(T &a, const T& b){if(a>b){a=b;}}
template <class T> T gcd(T a,T b){if(a<b)swap(a,b); if(a%b==0)return b; return gcd(b,a%b);}
template <class T> T lcm(T a,T b){return a/gcd(a,b)*b;}
template <class T> T modpow(T x,T n,T mod){T res=1; for(ll i=0;i<n;i++){res=res*x%mod;}return res;}
bool range(ll ny, ll nx, ll H, ll W) {if(ny < 0 || ny >= H || nx < 0 || nx >= W) return false; return true;}
/*------------------------------------------------------------------------------------*/

int main() {
    CINS(s);
    rep(i,len(s)){
        if(i%2==0 && !('a'<=s[i] && s[i]<='z')){
            COUT("No");
            return 0;
        }
        if(i%2==1 && !('A'<=s[i] && s[i]<='Z')){
            COUT("No");
            return 0;
        }
    }
    COUT("Yes");
}


#include <bits/stdc++.h>
/* #include <atcoder/all> */
using namespace std;
/* using namespace atcoder; */
using pint = pair<int, int>;
using ll = long long;
using ull = unsigned long long;
using vll = vector<long long>;
using vvll = vector<vector<long long>>;
using pll = pair<ll, ll>;
#define FOR(i, begin, end) \
    for (int i = (begin), i##_end_ = (end); i < i##_end_; i++)
#define IFOR(i, begin, end) \
    for (int i = (end)-1, i##_begin_ = (begin); i >= i##_begin_; i--)
#define REP(i, n) FOR(i, 0, n)
#define IREP(i, n) IFOR(i, 0, n)
#define VREP(s, ite) for (auto ite = s.begin(); ite != s.end(); ++ite)
#define FI first
#define SE second
#define ALL(v) v.begin(), v.end()
#define endl "\n"
#define ciosup  \
    cin.tie(0); \
    ios::sync_with_stdio(false);
#define eb emplace_back
#define vint vector<int>
#define vvint vector<vector<int>>
#define vbl vector<bool>
#define vvbl vector<vector<bool>>
constexpr ll INF = 1e15 + 7LL;
constexpr ll MOD = 998244353LL;
template <typename T>
istream &operator>>(istream &is, vector<T> &v) {
    for (int i = 0; i < v.size(); ++i) {
        is >> v[i];
    }
    return is;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
    if (v.size() == 0) return os;
    for (int i = 0; i < v.size() - 1; ++i) {
        os << v[i] << " ";
    }
    os << v[v.size() - 1];
    return os;
}

void solve() {
    double sx, sy, gx, gy;
    cin >> sx >> sy >> gx >> gy;
    gy = -gy;
    double dx = gx - sx, dy = sy - gy;
    /* cout << dx << " " << dy << endl; */
    double ans = sx + sy * ((dx)/(dy));
    cout.precision(16);
    cout << ans << endl;
}

int main() {
    solve();
    char tmp;
    while (cin >> tmp) {
        cin.putback(tmp);
        solve();
    }
}

#include <bits/stdc++.h>
//#include <cmath>
#define int long long
#define IOS std::ios::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL);
#define pb push_back
#define mod 1000000007
//#define lld long double
#define mii map<int, int>
#define mci map<char, int>
#define msi map<string, int>
#define pii pair<int, int>
#define ff first
#define ss second
#define bs(yup,x) binary_search(yup.begin(),yup.end(),x) //it will return bollean value
#define lb(yup,x) lower_bound(yup.begin(),yup.end(),x)  //it will return the adress of the number which is equal to or just greater than x ,and if it is equal to yup.end() than their in no such number exist
#define ub(yup,x) upper_bound(yup.begin(),yup.end(),x)
#define all(x) (x).begin(), (x).end()
#define rep(i,x,y) for(int i=x; i<y; i++)
#define fill(a,b) memset(a, b, sizeof(a))
#define vi vector<int>
#define setbits(x) __builtin_popcountll(x)
using namespace std;
const long long N=200005,INF=2000000000000000000;
const long double EPS= 0.000000000001;
int power(int a, int b, int p)
    {
        if(a==0)
        return 0;
        int res=1;
        //a%=p;
        while(b>0)
        {
            if(b&1)
            res=(res*a)%p;
            b>>=1;
            a=(a*a)%p;
        }
        return res;
    }

vi prime;
bool isprime[N];
void pre()
{
    for(int i=2;i<N;i++)
    {
        if(isprime[i])
        {
            for(int j=i*i;j<N;j+=i)
            isprime[j]=false;
            prime.pb(i);
        }
    }
    return;
}

int32_t main()
{

    IOS;
    //fill(isprime, true);
    //pre();
    int t=1;
    //cin>>t;
    while(t--)
    {
        int a,b,c;
        cin>>a>>b>>c;
        if(c)
        {
            if(b>a) cout<<"Aoki";
            else cout<<"Takahashi";
        }
        else
        {
            if(a>b) cout<<"Takahashi";
            else cout<<"Aoki";
        }
        cout<<"\n";
    }
}


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

// @@ !! LIM(f:gcd)
// --> f:gcd
// ---- inserted function gcd from util.cc

tuple<ll, ll, ll> mut_div(ll a, ll b, ll c, bool eff_c = true) {
  // auto [g, s, t] = mut_div(a, b, c, eff_c)
  //    If eff_c is true (default),
  //        g == gcd(|a|, |b|) and as + bt == c, if such s,t exists
  //        (g, s, t) == (-1, -1, -1)            otherwise
  //    If eff_c is false,
  //        g == gcd(|a|, |b|) and as + bt == g
  //    N.b.  gcd(0, t) == gcd(t, 0) == t.
  if (a == 0) {
    if (eff_c) {
      if (c % b != 0) return {-1, -1, -1};
      else            return {abs(b), 0, c / b};
    }else {
      if (b < 0) return {-b, 0, -1};
      else       return { b, 0,  1};
    }
  }else {
    auto [g, t, u] = mut_div(b % a, a, c, eff_c);
    // DLOGK(b%a, a, c, g, t, u);
    if (g == -1) return {-1, -1, -1};
    return {g, u - (b / a) * t, t};
  }
}

// auto [g, s, t] = eGCD(a, b)  --->  sa + tb == g == gcd(|a|, |b|)
//    N.b.  gcd(0, t) == gcd(t, 0) == t.
tuple<ll, ll, ll> eGCD(ll a, ll b) { return mut_div(a, b, 0, false); }

pair<ll, ll> crt_sub(ll a1, ll x1, ll a2, ll x2) {
  // DLOGKL("crt_sub", a1, x1, a2, x2);
  a1 = a1 % x1;
  a2 = a2 % x2;
  auto [g, s, t] = mut_div(x1, -x2, a2 - a1);
  // DLOGK(g, s, t);
  if (g == -1) return {-1, -1};
  ll z = x1 / g * x2;
  // DLOGK(z);
  s = s % (x2 / g);
  ll r = (x1 * s + a1) % z;
  // DLOGK(r);
  if (r < 0) r += z;
  // DLOGK(r);
  return {r, z};
};

// Chinese Remainder Theorem
//
//    r = crt(a1, x1, a2, x2)
//    ==>   r = a1 (mod x1);  r = a2 (mod x2);  0 <= r < lcm(x1, x2)
//    If no such r exists, returns -1
//    Note: x1 and x2 should >= 1.  a1 and a2 can be negative or zero.
//
//    r = crt(as, xs)
//    ==>   for all i. r = as[i] (mod xs[i]); 0 <= r < lcm(xs)
//    If no such r exists, returns -1
//    Note: xs[i] should >= 1.  as[i] can be negative or zero.
//          It should hold: len(xs) == len(as) > 0

ll crt(ll a1, ll x1, ll a2, ll x2) { return crt_sub(a1, x1, a2, x2).first; }

ll crt(vector<ll> as, vector<ll> xs) {
  // DLOGKL("crt", as, xs);
  assert(xs.size() == as.size() && xs.size() > 0);
  ll r = as[0];
  ll z = xs[0];
  for (size_t i = 1; i < xs.size(); i++) {
    // DLOGK(i, r, z, as[i], xs[i]);
    tie(r, z) = crt_sub(r, z, as[i], xs[i]);
    // DLOGK(r, z);
    if (r == -1) return -1;
  }
  return r;
}

// ---- end gcd
// @@ !! LIM  -- end mark --

int main(/* int argc, char *argv[] */) {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout << setprecision(20);

  auto solve = [&]() -> void {
    ll X, Y, P, Q; cin >> X >> Y >> P >> Q;
    ll ans = LLONG_MAX;
    for (ll u = 0; u < Y; u++) {
      for (ll v = 0; v < Q; v++) {
        ll t = crt(X + u, 2 * (X + Y), P + v, P + Q);
        if (t == -1) continue;
        ans = min(ans, t);
      }
    }
    if (ans == LLONG_MAX) {
      cout << "infinity\n";
    }else {
      cout << ans << "\n";
    }
  };

  ll T; cin >> T;
  for (ll t = 0; t < T; t++) solve();

  return 0;
}

#include<bits/stdc++.h>
#define fi first
#define se second

using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 9;
const int maxn = 2e3 + 5;

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

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

int main(){
	int T = rd();
	while(T--){
		ll n  = rd();
		if(n == 2) puts("Same");
		else if(n & 1) puts("Odd");
		else {
			int cnt = 0;
			while(n % 2 == 0) n /= 2,cnt++;
			if(cnt == 1) puts("Same");
			else puts("Even");
		}
	}
}


#include<bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i,n) for (ll i = 0; i < (n); ++i)
#define All(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()   //reverse
#define strall(v) (v).cbegin(),(v).cend() //const_itterator
#define IN(a, b, x) (a<=x&&x<b)
using namespace std;
using ll = long long;
using Pair = pair<int,int>;
using Graph = vector<vector<ll>>;
template<typename T> using min_priority_queue = priority_queue<T, vector<T>, greater<T>>;
template<typename t, typename u, typename Comp=less<>>
bool chmax(t& xmax, const u& x, Comp comp={}) { if(comp(xmax, x)) { xmax = x; return true; } return false;}
template<typename t, typename u, typename Comp=less<>>
bool chmin(t& xmin, const u& x, Comp comp={}) { if(comp(x, xmin)) { xmin = x; return true;} return false;}
const int INF = 1e9;
const ll infl = ll(1e18)+5;

int main(){
    int H,W;cin >> H >> W;
    int min_block = 105;
    vector<vector<int>> V(H,vector<int>(W,0));
    rep(i,H){
        rep(j,W){

            cin >> V[i][j];
            min_block = min(min_block,V[i][j]);
        }
    }
    int ans = 0;
    rep(i,H){
        rep(j,W){
           ans += V[i][j]-min_block;
        }
    }
    cout << ans << endl;
}

#include<iostream>
using namespace std;

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

	for (int i=n-1;i>=0;i--) {
		if (i==n-1 && str[0] != str[i]) {
			cout<<1<<endl;
			return 0;
		}
		else if (i<n-2 && str[0] != str[i] && str[n-1] != str[i+1]) {

			cout<<2<<endl;
			return 0;
		}
	}
	cout<<-1<<endl;
	return 0;
}


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

#define ll long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define vi vector<int>
#define vll vector<ll>
#define vpii vector<pair<int,int>>
#define vpll vector<pair<ll,ll>>
#define fr(i,k,n) for (int i = k; i < n; ++i)
#define fri(i,k,n) for (int i = k; i >= n; --i)
#define pb push_back
#define mp make_pair
#define all(arr) arr.begin(),arr.end()
#define ff first
#define ss second

const double pi=3.1415926535897932384626433832795;
const int inf=1e9;
const ll inf2=1e18;
const int mod=1e9+7;

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

int adj[20][20],n;
vi dp(1<<20,inf);

void solve(){
	int m;
	cin>>n>>m;
	int u,v;
	fr(i,0,m){
		cin>>u>>v;
		u--;
		v--;
		adj[u][v]=adj[v][u]=1;
	}
	for(int i=1;i<(1<<n);i++){
		if(!(i&(i-1))){
			dp[i]=1;
			continue;
		}
		dp[i]=1;
		for(int j=0;j<n;j++){
			if((i>>j)&1){
				for(int k=j+1;k<n;k++){
					if((i>>k)&1){
						if(adj[j][k]==0)
							dp[i]=inf;
					}
				}
			}
		}
		for(int j=(i-1)&i;j;j=(j-1)&i){
			dp[i]=min(dp[i],dp[j]+dp[i^j]);
		}
	}
	cout<<dp[(1<<n)-1]<<endl;
	return;
}

int main()
{
	boost();

	int tc=1;
	//cin>>tc;
	while(tc--)
		solve();
	return 0;
}

#ifdef Prateek
  #include "Prateek.h"
#else
  #include <bits/stdc++.h>
  using namespace std;
  #define debug(...) 42
#endif
#define F first
#define S second
#define pb push_back
#define f(i,x,n) for(int i=x;i<n;i++)
#define all(c) c.begin(),c.end()
#define int ll
using ll = long long;
const int MOD = 1e9+7, N = 20;

int g[N][N];
int n, m;
int dp[(1 << N)];

int dfs(int mask) {
   // debug(mask);
   int &ans = dp[mask];
   if (ans != -1) return ans;
   if (__builtin_popcount(mask) == 1) return ans = 1;
   if (__builtin_popcount(mask) == 2) {
      for (int i = 0; i < n; ++i) {
         for (int j = i + 1; j < n; ++j) {
            if ((mask >> i & 1) and (mask >> j & 1)) {
               if (g[i][j]) return ans = 1;
               return ans = 1e9;
            }
         }
      }
      assert(false);
   }
   int chk = 1;
   for (int i = 0; i < n; ++i) {
      for (int j = i + 1; j < n; ++j) {
         if ((mask >> i & 1) and (mask >> j & 1)) {
            if (!g[i][j]) {
               chk = 0;
               break;
            }
         }
      }
      if (!chk) break;
   }
   if (chk) {
      return ans = 1;
   }
   ans = 1e9;
   for (int s = mask; s; s = (s - 1) & mask) {
      if (s == mask) continue;
      // debug(s, mask ^ s);
      ans = min(ans, dfs(s) + dfs(mask ^ s));
   }
   return ans;
}

int32_t main(){
   ios::sync_with_stdio(false);
   cin.tie(NULL);
   memset(dp, -1, sizeof dp);
   cin >> n >> m;
   for (int i = 0; i < m; ++i) {
      int x, y;
      cin >> x >> y;
      --x, --y;
      g[x][y] = g[y][x] = 1;
   }
   int mask = (1 << n) - 1;
   int ans = dfs(mask);
   if (ans > n) ans = n;
   cout << ans << '\n';
   return 0;
}


#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <utility>
#include <algorithm>
#include <cmath>
#include <climits>
#include <iomanip>
#include <queue>
#include <stack>

using namespace std;

typedef long long ll;

const int INF = (1<<30)-1;
const ll LINF = 1e18;

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

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

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

char janken[] = {'R', 'S', 'P'};
int memo[101][101];
int v[100];
int n, k;

int mod_pow(int a, int x) {
    if (x == 0)
        return 1;
    else if (x % 2)
        return a * mod_pow(a, x-1) % n;
    else {
        int tmp = mod_pow(a, x/2);
        return tmp * tmp % n;
    }
}

int func(int l, int i)  {
    //cout << l << " " << i << "にきた" << endl;
    if (memo[l][i] != -1)
        return memo[l][i];
    if (l == 0) {
        //cout << v[i%n] << "の価値" << endl;
        return memo[l][i] = v[i % n];
    }

    //cout << l-1 << " " << i << " と" << l-1 << " " << (i+mod_pow(2, l-1))%n << "にいく" << endl;
    int a = func(l-1, i), b = func(l-1, (i+mod_pow(2, l-1))%n), ans;
    if (a == b)
        ans = a;
    else if ((a+1) % 3 == b)
        ans = a;
    else
        ans = b;
    return memo[l][i] = ans;
    //cout << ans << "の価値" << endl;
}

int main() {
    cin >> n >> k;
    string s;   cin >> s;
    rep(i, 101)rep(j, 101)  memo[i][j] = -1;
    rep(i, n) {
        rep(j, 3) {
            if (janken[j] == s[i])
                v[i] = j;
        }
    }

    int ans = func(k, 0);
    rep(j, 3) {
        if (janken[j] == janken[ans])
            cout << janken[j] << endl;
    }
    return 0;
}

//小数点精度
//cout << fixed << std::setprecision(15) << y << endl;

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>
#include <iomanip>
#include <stack>
#include <queue>
#include <numeric>
#include <map>
#include <unordered_map>
#include <set>
#include <fstream>
#include <chrono>
#include <random>
#include <bitset>
//#include <atcoder/all>
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define sz(x) ((int)(x).size())
#define pb push_back
using ll = long long;
using namespace std;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
ll gcd(ll a, ll b) {return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {return a/gcd(a,b)*b;}

int n,k; string s;

char f(char a, char b){
  if(a=='R'){
    if(b==('R')) return 'R';
    if(b==('P')) return 'P';
    if(b==('S')) return 'R';
  }
  if(a=='P'){
    if(b==('R')) return 'P';
    if(b==('P')) return 'P';
    if(b==('S')) return 'S';
  }
  if(a=='S'){
    if(b==('R')) return 'R';
    if(b==('P')) return 'S';
    if(b==('S')) return 'S';
  }
}

int main(){
  cin >> n >> k;
  cin >> s;
  rep(i,k){
    string news;
    if(sz(s)%2) s+=s;
    rep(j,sz(s)/2){
      news += f(s[2*j], s[2*j+1]);
    }
    s = news;
  }
  cout << s[0] << endl;
  return 0;
}


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

#include<cstdio>
#include<algorithm>

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

int a[2621500];

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

	int N, T;
	scanf("%d %d ", &N, &T);
	int A[50];
	rep(i, N) scanf("%d ", A + i);

	auto mae = a, ato = a + (1 << 20) + 1, sub = a + (1 << 21) + 2;

	int X = 1;
	rep(i, N / 2) {
		int x = 0, y = 0, z = 0;
		mae[X] = 2000000000;
		rep(x, X) {
			while (mae[y] < mae[x] + A[i]) sub[z++] = mae[y++];
			sub[z++] = mae[x] + A[i];
		}
		X <<= 1;
		while (sub[X - 1] > T) X--;
		swap(mae, sub);
	}
	int Y = 1;
	for (int i = N / 2; i < N; i++) {
		int x = 0, y = 0, z = 0;
		ato[Y] = 2000000000;
		rep(x, Y) {
			while (ato[y] < ato[x] + A[i]) sub[z++] = ato[y++];
			sub[z++] = ato[x] + A[i];
		}
		Y <<= 1;
		while (sub[Y - 1] > T) Y--;
		swap(ato, sub);
	}

	int j = Y - 1;
	ll kotae = 0;
	rep(i, X) {
		ll tmp = mae[i];
		while (j >= 0 && tmp + ato[j] > T) j--;
		if (j < 0) break;
		if (kotae < tmp + ato[j]) kotae = tmp + ato[j];
	}

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

	Would you please return 0;
}

#include<bits/stdc++.h>
#define ll long long int
#define inf 1E18
#define ninf -1*1E18
#define mod 1000000007
#define fi first
#define si second
#define pb push_back
#define vi vector<long long int>
#define pi pair<long long int,long long int>
#define vpi vector<pair<long long int,long long int>>
using namespace std;
ll const lac = 100000;

ll modmul(ll a, ll b) {

	return ((a % mod) * (b % mod)) % mod;

}
ll modadd(ll a, ll b) {
	return (((a % mod) + (b % mod))) % mod;
}
long long modExpo(long long a, long long b, long long m) {

	long long result = 1;
	a = a % m;
	while (b > 0) {

		if (b % 2) {

			result = modmul(result, a);
			b--;
		}

		else {
			a = modmul(a, a);
			b /= 2;
		}

	}

	return result % m;
}

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

class comp {   //set of pairs comparator:
public:
	bool operator()(int a, int b)const {

		return a > b;

	}

};

bool compa(int a, int b) {
	return a > b;
}

void solve(ll t1) {

	ll a1, b, c;
	cin >> a1 >> b >> c;

	vi a;
	a.pb(a1); a.pb(b); a.pb(c);
	sort(a.begin(), a.end());
	cout << a[2] + a[1] << "\n";

}

int main() {

	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	ll t ;
	t = 1;

	// init();
	// cin >> t;

	for (ll i = 1; i <= t; i++) {

		solve(t);
	}

	cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl;

	return 0;
}


#include<bits/stdc++.h>
#define ll long long int

using namespace std;
// ll n;

int main()
{
	 #ifndef ONLINE_JUDGE
freopen("inn.txt", "r", stdin);
freopen("hell.txt", "w", stdout);
#else
#endif
ll   n;
cin>>n;
ll   ans=0;
while(n--)
{
	ll   a,b;
	cin>>a>>b;
	ans+=(b*(b+1)/2-a*(a-1)/2);
}
cout<<ans<<endl;

}

#include <bits/stdc++.h>
using namespace std;
int main(){
  long long n;
  cin>>n;
  vector<long long> a(n);
  map<int,long long> cnt;
  for(int i=0;i<n;i++){
    cin>>a.at(i);
    cnt[a.at(i)]++;
  }
  long long ans=n*(n-1)/2;

  auto begin = cnt.begin(), end = cnt.end();
  for (auto iter = begin; iter != end; iter++) {
    long long x=iter->second;
    ans-=x*(x-1)/2;
  }
  cout<<ans<<endl;
}


/**
Abir3014
**/

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

typedef long long ll;

#define boost 	ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define for1(x, a, b)  for(x=a; x<b; x++)
#define for2(x, a, b)  for(x=a, x>=b; x--)
#define endl 	"\n"
#define all(x)  x.begin(), x.end()
#define p       pair
#define mp      make_pair
#define vi      vector<ll>
#define vii     vector<pair<ll, ll>>
#define msii    multiset<pair<ll, ll>>
#define msi     multiset<ll>
#define sii     set<pair<ll, ll>>
#define si      set<ll>
#define mii     map<ll, ll>
#define read	freopen("input.txt","r",stdin)
#define write   freopen("output.txt","w",stdout)
#define pb	    push_back
#define ff	    first
#define ss	    second
#define bb      begin
#define arr_ub(arr, n, x) upper_bound(arr, arr+n, x)-arr
#define arr_lb(arr, n, x) lower_bound(arr, arr+n, x)-arr
#define u_p(v, x) upper_bound(v.begin(), v.end(), x)-v.begin()
#define l_b(v, x) lower_bound(v.begin(), v.end(), x)-v.begin()
const ll sz=1e6+123;
#define INF 1000000000000000007
#define MOD 1000000007
#define stringLen 18446744073709551620
#define pi 3.1415926536
/**
ll fact(ll n){
	ll count=1;
	for(ll i=0; i<n; i++){
		count *= (n-i);
	}
	return count;
}
ll perm(ll n, ll r){
	ll count=1;
	for(ll i=0; i<r; i++){
		count *= (n-i);
	}
	return count;
}
ll comb(ll n, ll r){
	ll l = n-r, count=1;
	if(r<l)swap(l, r);
	count = perm(n, l);
	return count/fact(l);
}

vi divisorList[sz];
ll divisorNumber[sz];

void findDivisor(ll n){

	  for(ll i=1; i<=n; i++){

			for(ll j=i; j<=n; j+=i){
				 divisorList[j].pb(i);
		     	 divisorNumber[j]++;

			}
	  }

}

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

// lcm * gcd = a*b

ll lcm(ll a, ll b){

	if(a>b)swap(a, b);

	return a*(b/gcd(a, b));

}

bitset<sz>is_prime;
vi prime;

void primeGen(int n){

     for(int i=3; i<=n; i+=2)is_prime[i]=1;

     int nn = sqrt(n)+1;
     for(ll i=3; i<nn; i+=2){

		     if(is_prime[i]==0)continue;

			for(int j=i*i; j<=n; j+=(i+i)){
				is_prime[j]=0;
			}

     }
     is_prime[2]=1;
     prime.pb(2);
     for(int i=3; i<=n; i+=2){
	      if(is_prime[i])prime.pb(i);
     }

}

vector<long long>primeDivisors[sz];
long long primeDivisorNumbers[sz];
void findPrimeDivisors(long long n){

	for(auto u:prime){

		for(long long i = u; i<=n; i+=u){
			primeDivisors[i].push_back(u);
			primeDivisorNumbers[i]++;
		}

	}
}

vector<long long>factorization(long long n){
	//O(sqrt(n)/ln(sqrt(n)) + log2 n)
	vector<long long>factors;

	for(auto u:prime){

		if(1LL*u*u > n) break;
		if(n%u==0){
		//	factors.push_back(u);//for generating unique factors keep this line here
			while(n%(u)==0){
				//factors.push_back(u);//for generating all factors keep this line here
				n/=(u);
			}
		}

	}

	if(n>1)factors.push_back(n);
	return factors;
}
bool isPalindrome(string s){
    ll i=0,j=s.size()-1;
    for(i,j;i<=j;i++,j--){
        if(s[i]!=s[j]) return 0;
    }
    return 1;
}
int modpow(int x, int n , int m){
	if(n==0 )return 1%m;
	long long u = modpow(x, n/2, m);
	u=(u*u)%m;
	if(n%2==1) u = (u*x)%m;
	return u;
}
int NOD(long long n){

	int res=1;

	for(auto u:prime){
		if(1LL*u*u > n)break;

		if(n%u==0){
		      int count=1;
			while(n%u==0){
				n/=u;
				count++;
			}
			res *= count;
		}

	}
	if(n>1)res*=2;

	return res;

}
bool isPalindrome(string s){
    ll i=0,j=s.size()-1;
    for(i,j;i<=j;i++,j--){
        if(s[i]!=s[j]) return 0;
    }
    return 1;
}
**/
ll test=0;
void solve(){

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

      cout << 21 - a - b - c << endl;

      //cout<<"Case "<<++test<": "<<ans<<endl;
      //cout<<"Case #"<<++Case<<": ";

}
int main(){
	boost;
	//read; write;
	//int t; cin>>t; for(int i=1; i<=t; i++)
	solve();

	return 0;
}

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

const int maxn = 2e5+8, inf  = 1e18+9, mod  = 998244353;

int n, m;

void solve() {
    int i, j, a, b, c;
    cin >> a >> b >> c;
    cout << 21 - (a + b + c) << endl;
}

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


#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>
#include <iomanip>
#include <stack>
#include <queue>
#include <numeric>
#include <map>
#include <unordered_map>
#include <set>
#include <fstream>
#include <chrono>
#include <random>
#include <bitset>
//#include <atcoder/all>
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define sz(x) ((int)(x).size())
#define pb push_back
using ll = long long;
using namespace std;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
ll gcd(ll a, ll b) {return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {return a/gcd(a,b)*b;}

int main(){
  ll N; cin >> N;
  set<ll> ng;
  for(ll i=2;i*i<=N;i++){
    ll n = i*i;

    while(n<=N){
      ng.insert(n);
      n*=i;
    }
  }
  cout << N-sz(ng);
  return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < n; i++)
#define rep2(i, x, n) for(int i = x; i <= n; i++)
#define rep3(i, x, n) for(int i = x; i >= n; i--)
#define each(e, v) for(auto &e: v)
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define sz(x) (int)x.size()
using ll = long long;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
const int MOD = 1000000007;
//const int MOD = 998244353;
const int inf = (1<<30)-1;
const ll INF = (1LL<<60)-1;
template<typename T> bool chmax(T &x, const T &y) {return (x < y)? (x = y, true) : false;};
template<typename T> bool chmin(T &x, const T &y) {return (x > y)? (x = y, true) : false;};

struct io_setup{
    io_setup(){
        ios_base::sync_with_stdio(false);
        cin.tie(NULL);
        cout << fixed << setprecision(15);
    }
} io_setup;

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

    map<string, int> mp;
    rep(i, N){
        string S;
        cin >> S;
        if(S[0] != '!') mp[S] |= 1;
        else{
            string T;
            rep(i, sz(S)-1) T += S[i+1];
            mp[T] |= 2;
        }
    }

    each(e, mp){
        if(e.second == 3){
            cout << e.first << '\n';
            return 0;
        }
    }

    cout << "satisfiable\n";
}


#include<bits/stdc++.h>
//#include<atcoder/all>
//using namespace atcoder;
#define rep(i,n) for(ll i=0;i<(n);++i)
#define rep2(i,n) for(ll i=1;i<=(n);++i)
#define rep3(i,i0,n) for(ll i=i0;i<(n);++i)
#define rrep(i,n) for(ll i=((n)-1); i>=0; --i)
#define rrep2(i,n) for(ll i=(n); i>0; --i)
#define pb push_back
#define mod 1000000007
#define fi first
#define se second
#define len(x) ((ll)(x).size())
using namespace std;
using ll = long long;
using ld = long double;
using Pi = pair< ll, ll >;
using vl = vector<ll>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vp = vector<Pi>;
using vvc = vector<vector<char>>;
using vvl = vector<vector<ll>>;
using vvvl = vector<vector<vector<ll>>>;

const ll INF = 1LL << 60;
const ld PI = 3.1415926535897932385;
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; }
ll gcd(ll a, ll b) {return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b) {return a/gcd(a,b)*b;}
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define mp make_pair
void printb(ll N,ll d=16){
    rep(i,d){
        cout<<(N/(1<<(d-i-1)))%2;
    }
    cout<<endl;

}
void printv(vector<ll>a){
    rep(i,a.size()){
        if(i==a.size()-1){
            cout<<a[i]<<endl;
        }else{
            cout<<a[i]<<" ";
        }
    }
}
bool In_map(ll y,ll x,ll h,ll w){
    if(y<0 || x<0 || y>=h || x>=w){
        return 0;
    }else{
        return 1;
    }
}
bool compare(Pi a, Pi b) {
    if(a.first != b.first){
        return a.first < b.first;

    }else{
        return a.second < b.second;
    }
}

//const vector<ll> dx = {1, 0, -1, 0, 1, -1, 1, -1};
//const vector<ll> dy = {0, 1, 0, -1, 1, 1, -1, -1};
const vector<ll> dx{1,0,-1,0};
const vector<ll> dy{0,1,0,-1};

int main() {
    ll N;
    cin>>N;
    vl A(N);

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

    ll ans=0;

    rep(i,N){
        ans+=max(0LL,A[i]-10);
    }

    cout<<ans<<endl;
    return 0;

}

#include "bits/stdc++.h"

using namespace std;

#define ll long long

#define       forn(i,n)              for(int i=0;i<n;i++)
#define          all(v)              v.begin(), v.end()
#define         rall(v)              v.rbegin(),v.rend()

#define            pb                push_back
#define          sz(a)               (int)a.size()
#define         fastio               ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define      GR(a,n,m)               vector<vector<int>> a(n, vector<int>(m, 0));

void solve()
{
    ll ans = 0;
    int n;
    cin >> n;
    vector<int> a(n);;
    forn(i,n){
        cin >> a[i];
        if(a[i] > 10)ans += a[i] - 10;
    }
    cout<<ans;
}

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


#include <bits/stdc++.h>
using namespace std;
const int N = 10000;
int n;
bool mem[N][N];
class ad {
   public:
    int a, b, c, d, r, id;
    ad() {}
    void read() {
        scanf("%d%d%d", &a, &b, &r);
        mem[a][b] = true;
        c = a + 1, d = b + 1;
    }
    void print() { printf("%d %d %d %d\n", a, b, c, d); }
    int size;
    void cal_size() { size = (c - a) * (d - b); }
    double grad0, grad1;
    void cal_grad() {
        double p1 = 1.0 * size, p2 = size + d - b, p3 = size + c - a;
        p1 = min(p1 / r, r / p1), p2 = min(p2 / r, r / p2),
        p3 = min(p3 / r, r / p3);
        p1 = p1 * (2 - p1), p2 = p2 * (2 - p2), p3 = p3 * (2 - p3);
        grad0 = p2 - p1, grad1 = p3 - p1;
    }
    void init() {
        cal_size();
        cal_grad();
    }
    bool extend0() {
        if (a) {
            bool f = true;
            for (int j = b; j < d; ++j) {
                if (mem[a - 1][j]) {
                    f = false;
                    break;
                }
            }
            if (f) {
                for (int j = b; j < d; ++j) mem[a - 1][j] = true;
                --a;
                init();
                return true;
            }
        }
        if (c < 9999) {
            bool f = true;
            for (int j = b; j < d; ++j) {
                if (mem[c][j]) {
                    f = false;
                    break;
                }
            }
            if (f) {
                for (int j = b; j < d; ++j) mem[c][j] = true;
                ++c;
                init();
                return true;
            }
        }
        return false;
    }
    bool extend1() {
        if (b) {
            bool f = true;
            for (int i = a; i < c; ++i) {
                if (mem[i][b - 1]) {
                    f = false;
                    break;
                }
            }
            if (f) {
                for (int i = a; i < c; ++i) mem[i][b - 1] = true;
                --b;
                init();
                return true;
            }
        }
        if (d < 9999) {
            bool f = true;
            for (int i = a; i < c; ++i) {
                if (mem[i][d]) {
                    f = false;
                    break;
                }
            }
            if (f) {
                for (int i = a; i < c; ++i) mem[i][d] = true;
                ++d;
                init();
                return true;
            }
        }
        return false;
    }
    bool operator<(const ad &rhs) const {
        return max(grad0, grad1) > max(rhs.grad0, rhs.grad1);
    }
};
priority_queue<ad> q;
ad ans[200];
int main() {
    scanf("%d", &n);
    for (int i = 0; i < n; ++i) {
        ad t;
        t.read();
        t.id = i;
        t.init();
        q.push(t);
    }
    while (!q.empty()) {
        ad now = q.top();
        q.pop();
        bool f = false;
        if (now.grad0 >= now.grad1 && now.grad0 > 0) {
            if (now.extend0())
                f = true;
            else if (now.grad1 > 0 && now.extend1())
                f = true;
        }
        if (now.grad1 > now.grad0 && now.grad1 > 0) {
            if (now.extend1())
                f = true;
            else if (now.grad0 > 0 && now.extend0())
                f = true;
        }
        if (f)
            q.push(now);
        else
            ans[now.id] = now;
    }
    for (int i = 0; i < n; ++i) ans[i].print();
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define INF 1000000010
#define EPS 1e-9
#define fst first
#define scd second

#define debug(x) cout<<x<<endl;
#define repi(i,x,n) for(int i=x;i<n;i++)
#define rep(i,n) repi(i,0,n)
#define lp(i,n) repi(i,0,n)
#define repn(i,n) for(int i=n;i>=0;i--)
#define int long long
#define endl "\n"

signed main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n,k,m;
  cin>>n>>k>>m;
  int a;
  int sum=0;
  rep(i,n-1){
    cin>>a;
    sum+=a;
  }
  int ans=(m*n)-sum;
  if(ans>k) cout<<-1<<endl;
  else cout<<max(ans,(int)0)<<endl;

  return 0;
}


#include<bits/stdc++.h>
typedef long long ll;
typedef unsigned long long ull;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); mt19937 rng((unsigned int) chrono::steady_clock::now().time_since_epoch().count());
#define F first
#define S second
#define PI  4.0*atan(1.0);
#define pb push_back
using namespace std;
int mod=1e9+7,gaymod=998244353,MAX=1000000000,pomod=1073741824;
//long long int gcd(long long int x,long long int  y){
  // if(y==0)return x;
   //return gcd(y,x%y);
//}
int gcd(int x,int  y){
   if(y==0)return x;
   return gcd(y,x%y);
}
ll lcm(ll a, ll b)
{
    ll g=gcd(a, b);
    return a/g*b;
}
ll binexp(ll a,ll b){
if(b==0)return 1;
ll res=binexp(a,b/2);
if(b%2)return((res%mod)*(res%mod)*(a%mod));
else return((res%mod)*(res%mod));
}
int prime(ll x){
if(x%2==0&&x!=2)
return 0;
else{
    for(int i=3;ll(i*i)<=x;i+=2){
        if(x%i==0)
            return 0;
    }
}
return 1;
}
//main
/*
vector<char> is_prime(N+1, true);
void sieve(int n){
is_prime[0] = is_prime[1] = false;
for (int i = 2; i <= n; i++) {
    if (is_prime[i] && (long long)i * i <= n) {
        for (int j = i * i; j <= n; j += i)
            is_prime[j] = false;
    }
}
}
*/
//freopen("input.txt","r",stdin);
//freopen("input.txt","w",stdin);
const int N=2e5+5;
//
int main(){
IOS;
int t=1;
//cin>>t;
while(t--){
int n;
cin>>n;
ll arr[n];
for(int i=0;i<n;i++)cin>>arr[i];
sort(arr,arr+n);
ll ans=((arr[0]*arr[0])%gaymod),sum=(arr[0]%gaymod);
for(int i=1;i<n;i++){
    sum=2*sum-arr[i-1];
    sum+=arr[i];
    sum%=gaymod;
    ans+=sum*(arr[i]%gaymod);
    ans%=gaymod;
}
cout<<ans;
cout<<"\n";
}
return 0;
}

#include <bits/stdc++.h>

using namespace std;
#define ll unsigned long long int
#define endl "\n"
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
    ll a;
    cin>>a;
    int aa[a];
    int bb[a];
    for(int i=0;i<a;i++){
        cin>>aa[i];
    }
    for(int j=0;j<a;j++){
        cin>>bb[j];
    }
    ll q=aa[0];
    ll maxi=*max_element(aa,aa+a);
    ll mini=*min_element(bb,bb+a);
    if(maxi>mini){
        cout<<0;

    }
    else{
        cout<<mini-maxi +1;
    }
}


#include <bits/stdc++.h>
#define FOR(i, j, k) for(int i = j; i < k; i ++)
#define FORE(i, j, k) for(int i = j; i <= k; i ++)
#define FORD(i, j, k) for(int i = j; i >= k; i --)
#define mp make_pair
#define ll long long
//#define f first
//#define s second
//#define int long long
using namespace std;

const int MOD=1e9+7;
const int N = 200005;

int n;
string s;

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
//    #define task""
//    freopen(task".inp","r",stdin);
//    freopen(task".out","w",stdout);
    cin >> n;
    cin >> s;
    if(n == 1)
    {
        cout << -1;
        return 0;
    }
    if(s[0] != s[n - 1])
    {
        cout << 1 << "\n";
        return 0;
    }
    for(int i = 2; i < n; i ++)
    {
        if(s[i] != s[0] && s[i - 1] != s[0])
        {
            cout << 2;
            return 0;
        }
    }
	cout << -1;
    return 0;
}

//#include<math.h>
#include<algorithm>
#include<stdlib.h>
#include<time.h>
#include<stdio.h>
#include<string.h>
#define un unsigned
#define srd srand(time(0))
#define ll long long
#define con continue
#define gtc getchar()
#define ptc putchar
#define dou double
#define eps 0.00000000001
#define opr operator
#define cl(x,a) memset(x,a,sizeof(x))
#define fo0(i,k) for(i=fr[k];i;i=nx[i])
#define fo1(i,l,r) for(i=l;i<=r;i++)
#define fo2(i,l,r) for(i=l;i>=r;i--)
#define fo(i,n) for(i=1;i<=n;i++)
#define ret return
#define x first
#define cint const int
#define y second
#define opi(x) freopen(x,"r",stdin)
#define opo(x) freopen(x,"w",stdout)
#define tpl template<class T>
#define priq priority_queue
#define mp make_pair
#define use using namespace
#define WT while(T--)
use std;
typedef pair<int,int> pii;typedef pair<int,ll> pil;typedef pair<ll,int> pli;typedef pair<ll,ll> pll;
namespace io
{
	void _(int &k){char c;int e=1;k=0;while((c=gtc)>'9'||c<'0')if(c=='-')e=-1;k=c-'0';while((c=gtc)<='9'&&c>='0'){k*=10;k+=c-'0';}k*=e;}
	void _(ll &k){char c;int e=1;k=0;while((c=gtc)>'9'||c<'0')if(c=='-')e=-1;k=c-'0';while((c=gtc)<='9'&&c>='0'){k*=10;k+=c-'0';}k*=e;}
	void _(char &c){while((c=gtc)==' '||c=='\n');}void _(dou &c){scanf("%lf",&c);}void _(char *s){char c;while((c=gtc)!=EOF&&c!=' '&&c!=10)*s++=c;}
	template<class t1,class t2>void _(t1 &a,t2 &b){_(a);_(b);}template<class t1,class t2,class t3>void _(t1 &a,t2 &b,t3 &c){_(a);_(b);_(c);}
	template<class t1,class t2,class t3,class t4>void _(t1 &a,t2 &b,t3 &c,t4 &d){_(a);_(b);_(c);_(d);}
	template<class t1,class t2,class t3,class t4,class t5>void _(t1 &a,t2 &b,t3 &c,t4 &d,t5 &e){_(a);_(b);_(c);_(d);_(e);}
	void _p(dou k){printf("%.6lf",k);}void _p(char *c){for(;*c;ptc(*c++));}void _p(const char *c){for(;*c;ptc(*c++));}void _p(char c){ptc(c);}
	tpl void _p0(T k){if(k>=10)_p0(k/10);ptc(k%10+'0');}tpl void _p(T k){if(k<0){ptc('-');_p0(-k);}else _p0(k);}tpl void __p(T k){_p(k);ptc(' ');}
	tpl void _pn(T k){_p(k);ptc('\n');}template<class t1,class t2>void _p(t1 a,t2 b){__p(a);_pn(b);}
	template<class t1,class t2,class t3>void _p(t1 a,t2 b,t3 c){__p(a);__p(b);_pn(c);}
	template<class t1,class t2,class t3,class t4>void _p(t1 a,t2 b,t3 c,t4 d){__p(a);__p(b);__p(c);_pn(d);}
	tpl void op(T *a,int n){int i;n--;fo(i,n)__p(a[i]);_pn(a[n+1]);}int gi(){int x;_(x);ret x;}ll gll(){ll x;_(x);ret x;}
}
int gcd(int a,int b){ret b?gcd(b,a%b):a;}void fcl(){fclose(stdin);fclose(stdout);}
void fop(const char *s){char c[256],d[256];cl(c,0);cl(d,0);strcpy(c,s);strcpy(d,s);opi(strcat(c,".in"));opo(strcat(d,".out"));}
int eq(dou a,dou b){return a+eps>=b&&b+eps>=a;}tpl void _ma(T &a,T b){if(a<b)a=b;}tpl void _mi(T &a,T b){if(a>b)a=b;}
cint N=2222,EE=100000000,GG=1000000000,ima=2147483647;
use io;
char a[1111][1111];
int fa[N],n,m,c[N],d[N],f[N],T;
int fi(int k){return fa[k]=fa[k]==k?k:fi(fa[k]);}
void hb(int x,int y)
{
	x=fi(x);
	y=fi(y);
	fa[x]=y;
}
int main()
{
	int i,j,a1,a2;
	_(n,m);
	fo(i,n)
		scanf(" %s",a[i]+1);
	fo(i,2111)
		fa[i]=i;
	a[1][1]=a[1][m]=a[n][1]=a[n][m]='#';
	fo(i,n)
		fo(j,m)
			if(a[i][j]=='#')
				hb(i*2,j*2+1);
	fo(i,n)
		c[i]=fi(i*2);
	sort(c+1,c+n+1);
	fo(i,m)
		d[i]=fi(i*2+1);
	sort(d+1,d+m+1);
	_pn(min(unique(d+1,d+m+1)-d,unique(c+1,c+n+1)-c)-2);
}


#include<stdio.h>
int main()
{
	double x,a,b,c,d;
	scanf("%lf%lf%lf%lf",&a,&b,&c,&d);
	x=(c*b+a*d)/(b+d);
	printf("%.10f",x);
}

#include<bits/stdc++.h>
using namespace std;
#define fastIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long int
#define fi first
#define se second
#define pb push_back
#define pi pair<int,int>
#define all(v) (v).begin(), (v).end()
#define rep(i, l, r) for(int i=(int)(l);i<(int)(r);i++)
#define repd(i, l, r) for (int i=(int)(l);i>=(int)(r);i--)
#define clrg(i, l, r) for(int i=(int)(l);i<(int)(r);i++)vis[i]=0,v[i].clear();
ll power(ll x, unsigned ll y){ll res = 1;while (y > 0){ if (y & 1){res = res*x;} y = y>>1;x = x*x;}return res;}
int powermod(int x, unsigned int y, int p){int res = 1;x = x % p;while (y > 0){if (y & 1){res = (res*x) % p;}y = y>>1; x = (x*x) % p;}return res;}
#define print2d(mat,n,m){for(int i=0;i<(int)(n);i++){for(int j=0;j<(m);j++){cout<<mat[i][j]<<" ";}cout<< endl;}}
#define clr(a,x) memset(a,x,sizeof(a))
#define rr(v) for(auto &val:v)
#define print(v) for (const auto itr : v){cout<<itr<<' ';}cout<<"\n";
#define ln length()
#define sz size()
#define mod 1000000007
#define elif else if
#define INF 1e18+7

int32_t main()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
	fastIO;
	ll t,n,q,l,r,a,b,c,x,y,i,j;
	//cin>>t;
	t=1;
	while(t--)
	{
		double x1,y1,x2,y2;
		cin>>x1>>y1>>x2>>y2;
		double ans=(x2*y1+x1*y2)/(y2+y1);
		cout << fixed << setprecision(9) <<ans<<endl;
	}
	return 0;
}


#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<(int)(n);++i)
#define ALL(v)   (v).begin(),(v).end()
#define debug(x) cerr<<#x<<": "<<(x)<<endl
using namespace std;
using llong = long long;
using vi    = vector<int>;
using vvi   = vector<vi >;
using vvvi  = vector<vvi >;
using pii   = pair<int,int>;
constexpr int    INF  = 1e9;
constexpr llong  LINF = 1e18;
constexpr double EPS  = 1e-12;
constexpr int    MOD  = 1e9+7;
template<class Type>
void line(const Type &a){int cnt=0;for(const auto &elem:a)cerr<<(cnt++?' ':'>')<<elem;cerr<<endl;}

/*エラトステネスの篩*/
class Sieve{
	int size;					//size:=(要素数).
	std::vector<int> max_fact;	//max_fac[n]:=(nの最大の素因数（max_fact[n]=nのとき,iは素数）).
	std::vector<int> primes;	//primes:=([0,size)間の素数の集合).

public:
	//constructor.
	Sieve():Sieve(51e4){}
	Sieve(size_t n):size(n+1),max_fact(n+1,-1){//n以下の自然数を篩にかける. O(N*loglogN).
		for(int i=2;i<size;++i){
			if(max_fact[i]==-1){
				max_fact[i]=i;
				primes.push_back(i);
				for(int j=i+i;j<size;j+=i) max_fact[j]=i;
			}
		}
	}

	bool is_prime(int n) const{//素数判定. O(1).
		assert(0<=n and n<size);
		return max_fact[n]==n;
	}
	std::vector<int> get_primes() const{return primes;}
	std::map<int,int> prime_factorize(int n) const{//高速素因数分解.　O(logN).
		assert(0<=n and n<size);
		std::map<int,int> res;
		while(n>1){
			res[max_fact[n]]++;
			n/=max_fact[n];
		}
		return res;
	}
	std::vector<int> divisors(int n) const{//約数列挙.
		std::vector<int> res({1});
		auto pf=prime_factorize(n);
		for(auto [p,cnt]:pf){
			int sz=res.size();
			for(int i=0;i<sz;++i){
				int v=1;
				for(int j=0;j<cnt;++j){
					v*=p;
					res.push_back(res[i]*v);
				}
			}
		}
		return res;
	}
};

int main(){//I refer to other commentaries.
	int n;
	cin>>n;

	Sieve ob;
	for(int i=1;i<=n;++i){
		auto mp=ob.prime_factorize(i);

		int tmp=0;
		for(auto [ignore,cnt]:mp) tmp+=cnt;

		cout<<tmp+1<<endl;
	}
}

#include <bits/stdc++.h>
#pragma GCC optimize(3)
#define int long long
#define ri register
#define mk make_pair
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define is insert
#define es erase
using namespace std; const int N=200010;
inline int read()
{
	int s=0, w=1; ri char ch=getchar();
	while(ch<'0'||ch>'9') { if(ch=='-') w=-1; ch=getchar(); }
	while(ch>='0'&&ch<='9') s=(s<<3)+(s<<1)+(ch^48), ch=getchar();
	return s*w;
}
int n,a[N],b[N],p[N],to[N];
vector<pair<int,int> > w;
vector<pair<int,int> > Ans;
signed main()
{
	n=read();
	for(ri int i=1;i<=n;i++) a[i]=read(), w.eb(mk(a[i],i));
	for(ri int i=1;i<=n;i++) b[i]=read();
	for(ri int i=1;i<=n;i++) p[i]=read(), to[p[i]]=i;
	sort(w.begin(),w.end());
	for(ri int i=0;i<(int)w.size();i++)
	{
		int x=w[i].second;
		int y=to[x];
		if(x==y) continue;
		if(a[x]>b[p[x]] && a[y]>b[p[y]])
		{
			Ans.eb(mk(x,y));
			swap(p[x],p[y]);
			to[p[x]]=x, to[p[y]]=y;
		}
		else return puts("-1")&0;
	}
	printf("%lld\n",(int)Ans.size());
	for(auto i:Ans) printf("%lld %lld\n",i.first,i.second);
	return 0;
}


// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
// #include<atcoder/all>
using namespace std;
// using namespace atcoder;
using ll=long long;
template<class T,class U> inline bool chmin(T&x,U y){if(x>y){x=y;return true;}return false;}
template<class T,class U> inline bool chmax(T&x,U y){if(x<y){x=y;return true;}return false;}
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

// const ll INF = 1LL << 60;

int main() {
  int a,b;cin>>a>>b;
  if(a<b) {
    rep(i, b) cout << -1 *(i+1) << " ";
    rep(i, a-1) cout << 1 *(i+1) << " ";
    int sum = 0;
    for(int i = a; i <= b; i++) sum += i;
    cout << sum << endl;
  } else {
    rep(i, b-1) cout << -1 *(i+1) << " ";
    rep(i, a) cout << 1 *(i+1) << " ";
    int sum = 0;
    for(int i = b; i <= a; i++) sum += i;
    cout << -1*sum << endl;
  }

  return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
int main(void)
{
    LL  A,B;
    cin>>A>>B;
    LL ans=0;
    LL maxx=max(A,B);
    LL minn=min(A,B);
    for(LL  i=1;i<=minn-1;i++)
    {
        cout<<i<<' '<<-i<<' ';
    }
    if(A>B)
    {
        for(LL  i=minn;i<=maxx;i++)
        {
            cout<<i<<' ';
            ans=ans+i;
        }
        cout<<-ans<<' ';
        return 0;
    }
    else
    {
        for(LL  i=minn;i<=maxx;i++)
        {
            cout<<-i<<' ';
            ans=ans-i;
        }
        cout<<-ans<<' ';
        return 0;
    }
    return 0;
}


#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
using namespace std;
#define int                 		long long
#define double              		long double
#define endl                		"\n"
#define pb                  		push_back
#define PI                  		3.1415926535897932384626433832795l
#define F                   		first
#define S                   		second
#define mp                  		make_pair
#define f(i,n)              		for(int i=0;i<n;++i)
#define loop(i,a,b)         		for (int i=a ; i<b ;++i)
#define fastio              		ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define all(v)              		(v).begin(),(v).end()
#define rall(v)             		(v).rbegin(),(v).rend()
#define gcd(a,b)            		__gcd((a),(b))
#define fill(a,value)       		memset(a,value,sizeof(a));
#define minn(v)             		*min_element(v.begin(), v.end());
#define maxx(v)             		*max_element(v.begin(), v.end());
#define print(x)            		cout<<(x)<<endl;
typedef pair<int, int>      		pii;
typedef vector<int>         		vi;
const int mod = 1e9 + 7;
const int MOD = 998244353;

int power(int x, int y, int p)
{
	int res = 1;

	x = x % p;

	while (y > 0) {
		if (y & 1)
			res = (res * x) % p;
		y = y >> 1;
		x = (x * x) % p;
	}
	return res;
}
int modInverse(int n, int p)
{
	return power(n, p - 2, p);
}

// Returns nCr % p using Fermat's little
// theorem.
int nCr(int n,  int r, int p)
{
	// Base case
	if (r == 0)
		return 1;
	int fac[n + 1];
	fac[0] = 1;
	for (int i = 1; i <= n; i++)
		fac[i] = (fac[i - 1] * i) % p;

	return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) % p;
}

void solve()
{
	string s;
	cin >> s;
	int ans = 0;
	for (int i = 0; i < 9;)
	{
		if (s[i] == 'Z' and s[i + 1] == 'O' and s[i + 2] == 'N' and s[i + 3] == 'e')
		{
			ans++;
			i += 3;
		}
		else
		{
			i++;
		}

	}
	print(ans)
}

signed main()
{
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	fastio;
	cout << fixed << setprecision(12);
	int T = 1;
	//cin >> T;
	f(tc, T)
	{
		//cout << "Case #" << tc + 1 << ": ";
		solve();
	}
	return 0;
}

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

using ll = long long;

void solve(long long N, long long K, std::vector<std::vector<long long>> T){
    vector<int> zyunnretu;
    for(int i = 1;i < N;i++){
        zyunnretu.push_back(i);
    }
    ll ans = 0;
    do{
        ll cost = T[0][zyunnretu[0]];
        for(int i = 0;i < N - 2;i++){
            cost += T[zyunnretu[i]][zyunnretu[i + 1]];
        }
        cost += T[zyunnretu.back()][0];
        if(cost == K)ans++;
    }while(next_permutation(zyunnretu.begin(), zyunnretu.end()));
    cout<<ans<<endl;
}

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


#include<bits/stdc++.h>
#define pi 3.141592653589793238
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#define MOD 1000000007
#define INF 999999999999999999
#define pb push_back
#define ff first
#define ss second

#define mt make_tuple
#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>

using namespace __gnu_pbds;

typedef tree<ll, null_type, less_equal<ll>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

int main() {
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    fast;
    ll T = 1, i, j;

    //cin >> T;
    while (T--) {
        ll n;
        cin >> n;
        vector<ll> v(n);
        for(i = 0; i < n; i++){
            cin >> v[i];
        }
        sort(v.begin(), v.end());
        ll ans = v[0] + 1;
        for(i = 1; i < n; i++){
            ans *= (v[i] - v[i - 1] + 1);
            ans %= MOD;
        }
        cout << ans << endl;
    }
    return 0;
}

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

const ll MOD=1000000007;

int main(){
    int N;cin>>N;
    vector<ll>A;
    A.push_back(0);
    set<ll>B;
    ll tmp;
    rep(i,N){
        cin>>tmp;
        if(B.find(tmp)!=B.end())continue;
        B.insert(tmp);
        A.push_back(tmp);
    }
    sort(A.begin(),A.end());
    ll ans=1;
    rep(i,A.size()-1){
        ans*=(A[i+1]-A[i]+1);
        ans%=MOD;
        //cout<<ans<<"\n";
    }
    cout<<ans;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
#define REP(i, n) for(int i=0; i<n; i++)
#define REPi(i, a, b) for(int i=int(a); i<int(b); i++)
#define MEMS(a,b) memset(a,b,sizeof(a))
#define mp make_pair
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; }
const ll MOD = 998244353;

ll A[100][100];

class UnionFind{
    vector<int> par;
    vector<int> rank;
    vector<int> size;

public:
    UnionFind(int n){
        for(int i = 0; i < n; i++){
            par.push_back(i);
            rank.push_back(0);
            size.push_back(1);
        }
    }

    ll find(int x){
        if(x == par[x])
            return x;
        else
            return par[x] = find(par[x]);
    }

    void unite(int x, int y){
        x = find(x);
        y = find(y);
        if(x == y) return;
        if(rank[x] > rank[y]){
            par[y] = x;
            size[x] += size[y];
        }
        else{
            par[x] = y;
            rank[y] = max(rank[y], rank[x]+1);
            size[y] += size[x];
        }
    }

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

    int get_size(int x){
        return size[x];
    }
};

ll N, K;
ll KJ[100100];

ll calc(UnionFind& uni){
    ll ret = 1;
    vector<bool> isvisited(N, false);
    REP(i,N){
        int parent = uni.find(i);
        if(isvisited[parent]) continue;
        int size = uni.get_size(parent);
        ret *= KJ[size];
        ret %= MOD;
        isvisited[parent] = true;
    }
    return ret;
}

int main(){
    cin >> N >> K;
    REP(i,N){
        REP(j,N){
            cin >> A[i][j];
        }
    }

    UnionFind row(N+1), col(N+1);

    ll kaijo = 1;
    REPi(i,1,N+1){
        kaijo *= i;
        kaijo %= MOD;
        KJ[i] = kaijo;
    }

    REP(i,N){
        REPi(j,i+1,N){
            bool valid = true;
            REP(k,N){
                ll sum = A[i][k] + A[j][k];
                if(sum > K)
                    valid = false;
            }
            if(!valid) continue;
            row.unite(i,j);
        }
    }

    REP(i,N){
        REPi(j,i+1,N){
            bool valid = true;
            REP(k,N){
                ll sum = A[k][i] + A[k][j];
                if(sum > K)
                    valid = false;
            }
            if(!valid) continue;
            col.unite(i,j);
        }
    }

    ll ans = 1;
    ll row_score = calc(row);
    ll col_score = calc(col);
    ans = (ans * row_score) % MOD;
    ans = (ans * col_score) % MOD;

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

#include<stdio.h>
#include<iostream>
#include<algorithm>
#include<string>
#include<string.h>
#include<cmath>
#include<set>
#include<vector>

#define rep(i,a,b) for(ll i=a;i<=b;++i)
#define per(i,a,b) for(ll i=a;i>=b;--i)
#define fi first
#define se second
#define mp make_pair
#define all(x) x.begin(),x.end()
#define debug(x) cout<<# x <<" is "<<x<<endl;

using namespace std;
typedef long long ll;
typedef pair<ll,ll> PII;
const ll maxn=40+10,inf=0x3f3f3f3f3f3f3f3f,mod=1e9+7;

ll a[maxn],temp[int((1<<20)+10)];
set<ll> s1,s2;

int main()
{
	int n,t;	scanf("%d%d",&n,&t);
	rep(i,1,n) scanf("%lld",a+i);
	sort(a+1,a+1+n);

	s1.insert(0);
	rep(i,1,n/2){
		int cnt=0;
		for(auto iter=s1.begin();iter!=s1.end();iter++){
			ll num=*iter+a[i];
			if(s1.find(num)==s1.end()&&num<=t) temp[++cnt]=num;
		}
		rep(i,1,cnt) s1.insert(temp[i]);
	}

	s2.insert(0);
	rep(i,n/2+1,n){
		int cnt=0;
		for(auto iter=s2.begin();iter!=s2.end();iter++){
			ll num=*iter+a[i];
			if(s2.find(num)==s2.end()&&num<=t) temp[++cnt]=num;
		}
		rep(i,1,cnt) s2.insert(temp[i]);
	}

	//ll ans=0;
	//s1.insert(0);
	//auto iter=s2.end(),iter1=s1.begin();	iter--;
	//for(;iter!=s2.begin();iter--){
	//	auto temp=iter1;
	//	while(iter1!=s1.end()&&*iter1+*iter<=t) iter1++;
	//	//if(temp==iter1) continue;
	//	temp=iter1;	temp--;
	//	ans=max(ans,*temp+*iter);
	//}
	ll ans=0;
	s2.insert(-1);
	auto iter=s2.end(),iter1=s1.begin();	iter--;
	for(;iter!=s2.begin();iter--){
		if(*iter1+*iter>t) continue;
		else{
			while(iter1!=s1.end()&&*iter1+*iter<=t){
				ans=max(ans,*iter1+*iter);
				iter1++;
			}
			if(iter1==s1.end()) break;
		}
	}

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


//#pragma GCC optimize ("Ofast,unroll-loops")
//#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#include <unistd.h>
#define FAST_IO ios::sync_with_stdio(0);cin.tie(NULL)
#define all(v) (v).begin(),(v).end()
using namespace std;

typedef long long Long;
typedef long double Double;
typedef unsigned long long ULong;
typedef pair<Long, Long> Pair;

const int N = 3e5;
const Long INF = 1e18;

struct FenwickTree {
  Long tree[N + 1];
  void Clear(int n) {
    for (int i = 0; i <= n; i++) tree[i] = 0;
  }
  void Update(int i, Long delta) {
    while (i <= N) {
      tree[i] += delta;
      i += (i & -i);
    }
  }
  Long Query(int i) {
    Long sum = 0;
    while (i > 0) {
      sum += tree[i];
      i -= (i & -i);
    }
    return sum;
  }
} ft;

void Solve(void) {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    a[i]++;
  }
  Long ans = 0;
  vector<Long> cnt(n + 1, 0);
  for (int i = n - 1; i >= 0; i--) {
    cnt[a[i]] = ft.Query(a[i]);
    ans += cnt[a[i]];
    ft.Update(a[i] + 1, 1);
  }

  ft.Clear(n);
  for (int i = 0; i < n; i++) {
    cout << ans << '\n';
    ans -= (cnt[a[i]] + ft.Query(a[i]));
    ans += (n - a[i]);
    ft.Update(a[i] + 1, 1);
  }
}

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

  #include<bits/stdc++.h>
  #define fp(x,a,b) for(int x = a; x < b; x++)
  #define fn(x,a,b) for(int x = a; x > b; x--)
  #define f(x, m) for(auto x : m)
  #define cpu() ios::sync_with_stdio(false); cin.tie(nullptr)
  #define pb push_back
  #define pii pair<int,int>
  #define pll pair<ll, ll>
  #define vi vector<int>
  #define vl vector<ll>
  #define vii vector<pair<int ,int>>
  #define vll vector<pair<ll ,ll>>
  #define all(v) v.begin(),v.end()
  #define sor(a) sort( a.begin(), a.end() )
  #define ros(a) sort( a.rbegin(), a.rend())
  #define prec(n) fixed<<setprecision(n)
  #define ff first
  #define ss second
  // #define tt third
  #define print(x) for(auto it:x) cout<<it<<" ";
  #define debug(x) cerr << #x << " is " << x << endl;
  #define w(x) while(x--)
  #define r(x) scanf("%d", &x)
  #define rl(x) scanf("%ld", &x)
  #define rll(x) scanf("%lld", &x)
  typedef long long ll;
  using namespace std;
  // mt19937 mt(chrono::steady_clock::now().time_since_epoch().count());
  // template <typename TYPE> void readint(TYPE &x){
  // x=0; int f=1; char c;
  // for(c=getchar();!isdigit(c);c=getchar())if(c=='-')f=-1;
  // for(;isdigit(c);c=getchar())x=x*10+c-'0';
  // x*=f;
  // }
  #define dbg(args...){ string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss); err(_it, args); }
  void err(istream_iterator<string> it) {}
  template<typename T, typename... Args>
  void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
  }
  template<typename... T>
  void rd(T& ... args){
    ((cin >> args), ...);
  }
  template<typename... T>
  void ps(T&& ... args){
    ((cout << args << ' '), ...);
    cout<<"\n";
  }
  const ll MOD = 1e9 + 7, MAX = 1e5 + 5;
  const char nl = '\n';
  const ll INF = 2e9 + 5;
  int n;
  ll k, ans;
  ll a[MAX];
  void solve(){
    rd(n, k);
    int t = 0;
   while(n--){
    cin >> a[t++];
     if(a[t] > k) t--;
   }
   // ps(t, k);
   int x = t / 2;
   vl v1, v2;
   fp(i, 0, 1 << x){
    ll ga = 0LL;

    fp(j, 0, x){
      if(i & (1<<j)) ga += a[j];

    }
    v1.pb(ga);
  }
  // print(v1);
   fp(i, 0, 1 << (t - x)){
    ll ga = 0LL;

    fp(j, 0, t - x){
      if(i & (1<<j)) ga += a[j+x];

    }
    v2.pb(ga);
  }
   sor(v2);
  // print(v2);
  f(it, v1){
    auto xd = upper_bound(all(v2), k - it);
    if(xd != v2.begin()){
    xd--;
    if(*xd + it <= k) ans = max(*xd + it, ans);
   }
  }
  ps(ans);
  }
  int main(){
  cpu();
  // int __;
  //  cin>>__;
  //  while(__--){
  //   solve();
  //   ps(" ");
  //  }

  solve();
  // cout<<nl;

  return 0;
  }


#include <cstdio>
#include <cmath>
using namespace std;
typedef long long ll;

ll s,p;
int main(){
	scanf("%lld%lld",&s,&p);
	bool flag = 0;
	for(ll i = 1;i * i <= p;i++){
		if(p%i == 0){
			ll x = i,y = p/i;
			if(x + y == s) flag = 1;
		}
		if(flag) break;
	}
	if(flag) puts("Yes");
	else puts("No");
	return 0;
}

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <deque>
#include <bitset>
#include <iterator>
#include <list>
#include <stack>
#include <map>
#include <set>
#include <functional>
#include <numeric>
#include <utility>
#include <climits>
#include <iomanip>
#include <unordered_map>
#include <unordered_set>
#include <time.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
using namespace std;
#define ll long long
#define pb push_back
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
//typedef long long  MOD=1000000009;
ll MOD=998244353;
ll add(ll x, ll y) {ll res = x + y; return (res >= MOD ? res - MOD : res);}
ll mul(ll x, ll y) {ll res = x * y; return (res >= MOD ? res % MOD : res);}
//ll sub(ll x, ll y) {ll res = x - y; return (res < 0 ? res + MOD : res);}
ll lcm(ll x, ll y) {ll res = (x * y) / __gcd(x, y); return res;}
ll power(ll x, ll y) {if (y < 0) return 1; ll res = 1; x %= MOD; while (y) {if (y & 1)res = mul(res, x); y >>= 1; x = mul(x, x);} return res;}

void iofoj(){
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	freopen("error.txt","w",stderr);
	#endif
}
#define F first
#define S second

map<ll,ll>mp;

ll ans(ll a,ll b)
{
    if(a>=b)return mp[b]=a-b;
    if(mp.find(b)!=mp.end())return mp[b];
    ll sum=b-a;
    if(b%2==0)
    {
        return mp[b]=min(sum,ans(a,b/2)+1);
    }
    return mp[b]=min(sum,min(ans(a,(b+1)/2),ans(a,(b-1)/2))+2);
}

void solution()
{
    ll k,i,j,m,w,n;
    ll a,b;
    cin>>a>>b;
    cout<<ans(a,b);
}

int main(){
    fio
    //iofoj();
    // ll t;
    // cin>>t;
    // for(ll i=1;i<=t;i++)
    solution();
    return 0;
}


/**
 * code generated by JHelper
 * More info: https://github.com/AlexeyDmitriev/JHelper
 * @author
 */

#include <iostream>
#include <fstream>

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

inline int inint(istream& in) {int x; in >> x; return x;}
inline ll inll(istream& in) {ll x; in >> x; return x;}
inline string instr(istream& in) {string x; in >> x; return x;}

#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define FOR(i, a, b) for (int i = (a), i##_len = (b); i <= i##_len; ++i)
#define REV(i, a, b) for (int i = (a); i >= (b); --i)
#define CLR(a, b) memset((a), (b), sizeof(a))
#define DUMP(x) cout << #x << " = " << (x) << endl;
#define INF 1001001001001001001ll
#define fcout cout << fixed << setprecision(12)

class AChinchirorin {
public:
void solve(std::istream& in, std::ostream& out) {
    int a = inint(in);
    int b = inint(in);
    int c = inint(in);

    if(a == b){
        out << c << endl;
    }else if(b == c){
        out << a << endl;
    }else if(a == c){
        out << b << endl;
    }else{
        out << 0 << endl;
    }

}
};

int main() {
	AChinchirorin solver;
	std::istream& in(std::cin);
	std::ostream& out(std::cout);
	solver.solve(in, out);
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define f(i,a,b) for(int i=a; i<b; i++)
#define fr(i,a,b) for(int i=a; i>=b; i--)
#define fll(i,a,b) for(ll i=a; i<b; i++)
#define frll(i,a,b) for(ll i=a; i>=b; i--)
typedef vector<int> vi;
typedef long long int ll;
typedef vector<ll> vll;

#define fastio std::ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define PI 3.1415926535
ll Mod = 1e9+7;
ll N = 1e5;

// ll Mod = 998244353;

// ll mult(ll a, ll b) {
//     ll ret = 1;
//     ret = ((a%Mod) * (b%Mod))%Mod;
//     return ret;
// }

// ll power(ll a, ll b = Mod-2) {
//     if(b == 0) return 1;
//     ll ret = 1;
//     while(b) {
//         if(b&1) {
//             ret = mult(ret,a);
//         }
//         a = mult(a,a);
//         b>>=1;
//     }
//     return ret;
// }

// ll sub(ll a, ll b) {
//     ll ret = (a%Mod - b%Mod + Mod)%Mod;
//     return ret;
// }

// void seive(vector<bool> &status) {
//      f(i,2,2e6+1) {
//          if(status[i]) {
//                 for(ll j = i*i; j<=2e6; j+=i) status[j] = 0;
//          }
//      }
//  }

// int getmex(vi& occr, int n, int mex) {
//     for(int i = mex; i<n; i++) {
//         if(occr[i] == 0) return i;
//     }
//     return n;
// }

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

void solve_case() {
    int n;
    cin>>n;
    vll a(n), p_max(n,-1), p_sum(n,0);

    f(i,0,n) {
        cin>>a[i];
        if(i == 0) {
            p_max[i] = a[i];
            p_sum[i] = a[i];
        } else {
            p_max[i] = max(a[i],p_max[i-1]);
            p_sum[i] = p_sum[i-1] + a[i];
        }
    }

    f(i,1,n) p_sum[i] = p_sum[i] + p_sum[i-1];

    ll p_ans = 0, ans = 0;

    f(i,0,n) {
        cout<<p_sum[i] + (i+1)*p_max[i]<<'\n';
    }
    return;
}

int main() {
    #ifndef ONLINE_JUDGE
        freopen("input.txt","r",stdin);
        freopen("output.txt","w",stdout);
    #endif

    fastio;
    // vector<bool> status(2e6+1,1);
    int t = 1;
    // vi primes;
    // seive(status);
    // f(i,2, 2e6+1) {
    //     if(i > 5000) {
    //         break;
    //     }
    //     if(status[i]) primes.push_back(i);
    // }
    // cin>>t;
    while(t--) {
        solve_case();
    }
}


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

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

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

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

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

vec modncrlistp,modncrlistm;

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

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

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

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

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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define ALL(a)  (a).begin(),(a).end()

const int INF = 1 << 30;
const int MOD = 1e9 + 7;
const long long LINF = 1LL << 60;
const double PI = 3.141592653589793;
const int NIL = -1;
const int MAX = 1100000;
const int LARGE = 10000;

double X, Y, R;
ll XX, YY, RR;

bool inside(ll x, ll y) {
    x *= LARGE; y *= LARGE;
    return (x - XX) * (x - XX) + (y - YY) * (y - YY) <= RR * RR;
}

ll calc_lower(ll x) {
    ll ok = floor(Y);
    ll er = ok - floor(R) - 10;
    if (!inside(x, ok)) return 0;
    while(abs(ok - er) > 1) {
        ll mid = (ok + er) / 2;
        if (inside(x, mid)) ok = mid;
        else er = mid;
    }
    return floor(Y) - er;
}

ll calc_upper(ll x) {
    ll ok = floor(Y) + 1;
    ll er = ok + floor(R) + 10;
    if (!inside(x, ok)) return 0;
    while(abs(ok - er) > 1) {
        ll mid = (ok + er) / 2;
        if (inside(x, mid)) ok = mid;
        else er = mid;
    }
    return er - (floor(Y) + 1);
}

int main() {
    cin >> X >> Y >> R;
    X -= floor(X);
    Y -= floor(Y);
    XX = (ll) round(X * LARGE);
    YY = (ll) round(Y * LARGE);
    RR = (ll) round(R * LARGE);

    ll ans = 0;
    for (ll x = floor(X - R - 10); x < floor(X + R + 10); x++) {
        ans += calc_upper(x) + calc_lower(x);
    }
    cout << ans << endl;
}


//#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
//#pragma GCC target("avx,avx2")
//#pragma GCC target("avx2")
//#pragma GCC optimize("O3")

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

# include <ext/pb_ds/assoc_container.hpp>
# include <ext/pb_ds/tree_policy.hpp>

using namespace __gnu_pbds;
using namespace std;

template<typename T> using ordered_set = tree <T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

#define _USE_MATH_DEFINES_
#define ll long long
#define ld long double
#define Accepted 0
#define pb push_back
#define mp make_pair
#define sz(x) (int)(x.size())
#define every(x) x.begin(),x.end()
#define F first
#define S second
#define lb lower_bound
#define ub upper_bound
#define For(i,x,y)  for (ll i = x; i <= y; i ++)
#define FOr(i,x,y)  for (ll i = x; i >= y; i --)
#define SpeedForce ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
// ROAD to...                                                                                Red

void setIn(string s) { freopen(s.c_str(),"r",stdin); }
void setOut(string s) { freopen(s.c_str(),"w",stdout); }
void setIO(string s = "") {
	// cin.exceptions(cin.failbit);
	// throws exception when do smth illegal
	// ex. try to read letter into int
	if (sz(s)) { setIn(s+".in"), setOut(s+".out"); } // for USACO
}

const double eps = 0.000001;
const ld pi = acos(-1);
const int maxn = 1e7 + 9;
const int mod = 1e9 + 7;
const ll MOD = 1e18 + 9;
const ll INF = 1e18 + 123;
const int inf = 2e9 + 11;
const int mxn = 1e6 + 9;
const int N = 6e5+5;
const int M = 22;
const int pri = 997;
const int Magic = 2101;

const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
mt19937 gen(chrono::steady_clock::now().time_since_epoch().count());

int rnd (int l, int r) {
	return uniform_int_distribution<int> (l, r)(gen);
}

int c[(1<<18)];
int e[18][18];
int dp[(1<<18)];
vector<int> w[18];

void solve() {
	int n, m;
	cin >> n >> m;
	for (int i = 0; i < m; ++i) {
		int a, b;
		cin >> a >> b;
		--a, --b;
		e[a][b] = e[b][a] = 1;
	}

	for (int msk = (1<<n)-1; msk; --msk) {
		c[msk] = 1;
		for (int i = 0; i < n; ++i) if(msk&(1<<i)) {
			for (int j = i+1; j < n; ++j) if(msk&(1<<j) && e[i][j] == 0) {
				c[msk] = 0;
			}
		}
		dp[msk] = __builtin_popcount(msk);
		if(c[msk] && msk>0) {
			int lst = -1;
			for (int i = 0; i < n; ++i)
				if(msk&(1<<i)) {
					lst =i;
				}
			int wast = 0;

			for (auto x : w[lst]) {
				if((x&msk) == msk) {
					wast=1;
					break;
				}
			}
			if(!wast)
				w[lst].pb(msk);
			dp[msk] = 1;
		}
	}

	for (int i = 0; i < n; ++i) {
		for (int msk = 0; msk < (1<<n); ++msk) {
			if(msk&(1<<i)) {
				dp[msk^(1<<i)] = min(dp[msk^(1<<i)], dp[msk]);
			}
		}
	}

	for (int i = 0; i < n; ++i) {
		for (int msk = 0; msk < (1<<n); ++msk) {
			if(dp[msk] <= 1)
				continue;
			for(auto j : w[i])
				dp[msk] = min(dp[msk], dp[msk^(msk&j)] + 1);
		}
	}
	cout << dp[(1<<n)-1] << '\n';
}

int main () {
	SpeedForce;

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

	return Accepted;
}

// B...a

#include <bits/stdc++.h>

using namespace std;

#define ar array
#define ll long long
#define all(x) (x).begin(), (x).end()
ll a,b,n,m,adj[18],dp[1<<18],s[1<<18];
int chrom(){
    ll al=1<<n;
    ll bigp=1077563119;
    dp[0]=1;
    for(ll i=0;i<al;i++){
        if ((n-__builtin_popcount(i))%2){
            s[i]=1;
        }
        else{
            s[i]=-1;
        }
    }
    for(ll i=1;i<al;i++){
        int ctz = __builtin_ctz(i);
        dp[i]=dp[i-(1<<ctz)]+dp[(i-(1<<ctz))&adj[ctz]];
        dp[i]=dp[i]%bigp;
    }
    for(int k=1;k<n;k++){
        int ans=0;
        for(ll i=0;i<al;i++){
            s[i]=s[i]*dp[i];
            ans=ans+s[i];
        }
        if(ans!=0){
            return k;
        }
    }
    return n;
}
int main() {
    cin>>n>>m;
    memset(adj,0,sizeof(adj));
    for(int i=0;i<m;i++){
        cin>>a>>b;
        a=a-1;
        b=b-1;
        adj[a]|=1<<b;
        adj[b]|=1<<a;
    }
    cout<<chrom()<<endl;
    return 0;
}


#define LOCAL
#define _USE_MATH_DEFINES
#include <array>
#include <cassert>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <iomanip>
#include <string>
#include <sstream>
#include <vector>
#include <queue>
#include <stack>
#include <list>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>
#include <complex>
#include <cmath>
#include <numeric>
#include <bitset>
#include <functional>
#include <random>
#include <ctime>

using namespace std;

template <typename A, typename B>
ostream& operator <<(ostream& out, const pair<A, B>& a) {
  out << "(" << a.first << "," << a.second << ")";
  return out;
}
template <typename T, size_t N>
ostream& operator <<(ostream& out, const array<T, N>& a) {
  out << "["; bool first = true;
  for (auto& v : a) { out << (first ? "" : ", "); out << v; first = 0;} out << "]";
  return out;
}
template <typename T>
ostream& operator <<(ostream& out, const vector<T>& a) {
  out << "["; bool first = true;
  for (auto& v : a) { out << (first ? "" : ", "); out << v; first = 0;} out << "]";
  return out;
}
template <typename T, class Cmp>
ostream& operator <<(ostream& out, const set<T, Cmp>& a) {
  out << "{"; bool first = true;
  for (auto& v : a) { out << (first ? "" : ", "); out << v; first = 0;} out << "}";
  return out;
}
template <typename U, typename T, class Cmp>
ostream& operator <<(ostream& out, const map<U, T, Cmp>& a) {
  out << "{"; bool first = true;
  for (auto& p : a) { out << (first ? "" : ", "); out << p.first << ":" << p.second; first = 0;} out << "}";
  return out;
}
#ifdef LOCAL
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
#else
#define trace(...) 42
#endif
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
  cerr << name << ": " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << ": " << arg1 << " |";
  __f(comma + 1, args...);
}

typedef long long int64;
typedef pair<int, int> ii;
#define SZ(x) (int)((x).size())
const int INF = 1 << 29;
const int MOD = 1e9 + 7;
mt19937 mrand(random_device{}());
int rnd(int x) { return mrand() % x; }

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

int main() {
  int64 n;
  cin >> n;
  vector<int64> ret;
  for (int64 i = 1; i * i <= n; ++i) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i != n / i) ret.push_back(n / i);
    }
  }
  sort(ret.begin(), ret.end());
  for (auto& x : ret) cout << x << '\n';
  return 0;
}

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

#define ALL(obj) begin(obj), end(obj)
#define debug(x) cerr<< #x << ": "<< x <<"\n";
#define rep(i, n) for(int i=0; i<(int)(n); i++)

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

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

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

    for(ll i=1; i<=N; i++){
        //cout<<i<<" "<<1+i*(i-1)/2<<endl;
        if(2*i+i*(i-1) >= 2*N){
            cout<<i<<endl;
            return 0;
        }
    }
    return 0;
}


#include <iostream>
#include <vector>
#include <string>
#include <array>
#include <functional>
#include <algorithm>
#include <stack>
#include <map>
#include <set>
#include <climits>
#include <queue>
#include <bitset>
#include <cassert>
#include <math.h>
using namespace std;
#define ll long long
#define pb(x) push_back(x)
#ifdef _OLIMPOLOCAL
    #define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
    #define debug(...) 1337
#endif
void debug_out() { cout << "\n";}
template<typename T1, typename... T2> void debug_out(T1 A, T2... B) { cout << " " << A; debug_out(B...); }
int test = 1;
#define MOD 998244353ll
//-------------------------- ^ DONT TOUCH ^-----------------------------------------------------------------
const int lm = 3001;
int n, k;
ll N[lm];
ll M[lm][lm];

ll dp(int _n, int _k) {
    if (_n == 0) {
        if (_k == 0) return 1;
        return 0;
    }
    if (_k == 0) return 0;
    if (_n < _k) return 0;
    if (M[_n][_k] == -1) {
        ll d1 = dp(_n-1, _k-1);
        ll d2 = dp(_n, _k * 2);
        M[_n][_k] = (d1 + d2) % MOD;
    }
    return M[_n][_k];
}

void solve() {
    cin >> n >> k;

    for (int i = 0 ; i <= n; i++)
        for (int j = 0; j <=n ; j++)
            M[i][j] = -1;
    cout << dp(n, k) % MOD << endl;
}

int main(int argc, const char * argv[]) {
    ios_base::sync_with_stdio(0);cin.tie(0);
    //cin >> test;
    for (int testCount = 1; testCount <= test; testCount++)
    {
        #ifdef _OLIMPOLOCAL
            cout << "---------------Test case " << testCount << "---------------"<< endl;
        #endif
        solve();
    }

    return 0;
}

#include <bits/stdc++.h>

// 1. dp
typedef long double ld;
#define int long long

#define gcd            __gcd
#define endl           "\n"
#define setbits(x)     __builtin_popcountll(x)
#define zrobits(x)     __builtin_ctzll(x)
#define mod            1000000007
#define mod2           998244353
#define maxe           *max_element
#define mine           *min_element
#define inf            1e18
#define pb             push_back
#define all(x)         x.begin(), x.end()
#define f              first
#define s              second
#define lb             lower_bound
#define ub             upper_bound
#define ins            insert
#define sz(x)          (int)(x).size()
#define mk             make_pair
#define deci(x, y)     fixed<<setprecision(y)<<x
#define w(t)           int t; cin>>t; while(t--)
#define nitin          ios_base::sync_with_stdio(false); cin.tie(nullptr)
#define PI             3.141592653589793238
using namespace std;
int dp[4000][4000];
int solve(int n,int k){
    if(k>n) return 0;
    if(n==0) return 1;
    if(k==0) return 0;
    if(dp[n][k]!=0)
        return dp[n][k];
    return dp[n][k]=(solve(n-1,k-1)+solve(n,2*k))%mod2;

}
void solve() {
    int n,k;
    cin>>n>>k;
    cout<<solve(n,k)<<endl;
}

int32_t main() {
    nitin;

    solve();
}


#include <bits/stdc++.h>
#define REP(i, s, n) for (int i = s; i < (int)(n); i++)
#define ALL(a) a.begin(), a.end()
#define MOD 1000000007
using namespace std;
using ll = long long;

class CombinationPascal {
   public:
    CombinationPascal(int n) {
        N = n;
        dp.assign(n + 1, vector<ll>(n + 1));

        dp[0][0] = 1;
        REP(i, 1, n + 1) {
            REP(j, 0, i + 1) {
                if (j - 1 >= 0)
                    dp[i][j] = dp[i - 1][j - 1] + dp[i - 1][j];
                else
                    dp[i][j] = dp[i - 1][j];
            }
        }
    }

    ll cnr(int n, int k) {
        return dp[n][k];
    }

   private:
    int N;
    vector<vector<ll>> dp;
};

CombinationPascal comb(65);

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

    string ans = "";
    int L = A + B;
    K--;
    REP(i, 0, L) {
        ll c = comb.cnr(A + B - 1, B);
        if (A && K < c) {
            ans += 'a';
            A--;
        } else {
            ans += 'b';
            B--;
            K -= c;
        }
    }
    cout << ans << endl;
    return 0;
}

#include <bits/stdc++.h>
using ll = long long;
using std::cin;
using std::cout;
using std::endl;
std::mt19937 rnd(std::chrono::steady_clock::now().time_since_epoch().count());
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const int inf = (int)1e9 + 7;
const long long INF = 1LL << 60;

std::chrono::system_clock::time_point  start, end;
void solve()
{
	std::mt19937 kkt(89);
	int _, m; cin >> _ >> m;
	const int n = 20;
	std::vector<std::string> vs(m);
	for (int i = 0; i < m; ++i)
	{
		cin >> vs[i];
	}
	std::vector<std::pair<std::string, std::vector<int>>> a;
	std::vector<int> r, gomi, used(m), nr;
	for (int i = 0; i < m; ++i)
	{
		r.emplace_back(i);
	}
	while (not r.empty() and (int)a.size() < n)
	{
		std::string s;
		std::vector<int> v;
		std::shuffle(r.begin(), r.end(), kkt);
		s = vs[r[0]];
		v.emplace_back(r[0]);
		used[r[0]] = true;
		for (int jupi = 1; jupi < (int)r.size(); jupi++)
		{
			const std::string &t = vs[r[jupi]];
			for (int i = 0; i < (int)s.size(); ++i)
			{
				const int len = std::min((int)s.size() - i, (int)t.size());
				if((int)s.size() + (int)t.size() - len > n)
					continue;
				if(s.substr(i, len) == t.substr(0, len))
				{
					s += t.substr(len, (int)t.size() - len);
					v.emplace_back(r[jupi]);
					used[r[jupi]] = true;
					break;
				}
			}
		}
		for(const auto &e : r)
		{
			if(not used[e])
			{
				const std::string &t = vs[e];
				bool in = false;
				for (int i = 0; i <= (int)s.size() - (int)t.size(); ++i)
				{
					if(s.substr(i, (int)t.size()) == t)
						in = true;
				}
				if(in)
				{
					v.emplace_back(e);
					used[e] = true;
				}
				else
				{
					gomi.emplace_back(e);
				}
			}
		}
		std::swap(gomi, r);
		gomi.clear();
		a.emplace_back(std::make_pair(s, v));
	}
	const double deadline = 2950;
	while(true)
	{
		end = std::chrono::system_clock::now();
		if(std::chrono::duration_cast<std::chrono::milliseconds>(end-start).count() > deadline)
			break;
		int h = rnd() % n;
		nr = r;
		for(const auto &e : a[h].second)
		{
			nr.emplace_back(e);
		}
		std::shuffle(nr.begin(), nr.end(), kkt);
		std::string s;
		std::vector<int> v;
		s = vs[nr[0]];
		v.emplace_back(nr[0]);
		for (int jupi = 1; jupi < (int)r.size(); jupi++)
		{
			const std::string &t = vs[nr[jupi]];
			for (int i = 0; i < (int)s.size(); ++i)
			{
				const int len = std::min((int)s.size() - i, (int)t.size());
				if((int)s.size() + (int)t.size() - len > n)
					continue;
				if(s.substr(i, len) == t.substr(0, len))
				{
					s += t.substr(len, (int)t.size() - len);
					v.emplace_back(nr[jupi]);
					break;
				}
			}
		}
		if(v.size() > a[h].second.size())
		{
			for(const auto &e : a[h].second)
			{
				used[e] = false;
			}
			for(const auto &e : v)
			{
				used[e] = true;
			}
			gomi.clear();
			for(const auto &e : nr)
			{
				if(not used[e])
				{
					const std::string &t = vs[e];
					bool in = false;
					for (int i = 0; i <= (int)s.size() - (int)t.size(); ++i)
					{
						if(s.substr(i, (int)t.size()) == t)
							in = true;
					}
					if(in)
					{
						v.emplace_back(e);
						used[e] = true;
					}
					else
					{
						gomi.emplace_back(e);
					}
				}
			}
			std::swap(gomi, r);
			a[h] = std::make_pair(s, v);
		}
	}
	std::vector<std::vector<char>> res(n, std::vector<char>(n, '.'));
	for (int i = 0; i < (int)a.size(); ++i)
	{
		for (int j = 0; j < (int)a[i].first.size(); ++j)
		{
			res[i][j] = a[i].first[j];
		}
	}
	for (int i = 0; i < n; ++i)
	{
		for (int j = 0; j < n; ++j)
		{
			cout << res[i][j];
		}
		cout << "\n";
	}
}

int main()
{
  std::cin.tie(nullptr);
  std::ios::sync_with_stdio(false);

  start = std::chrono::system_clock::now();
  int kkt = 1;
  //cin >> kkt;
  while(kkt--)
    solve();
  return 0;
}