#include <iostream>
#include <string>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;

int main() {

    string S;
    cin >> S;

    cout  << S.substr(1) << S.substr(0, 1) << endl;

    return 0;
}

// Jai Shree Ram
#include<bits/stdc++.h>
typedef long long int ll;
#define pb push_back
#define max2(a,b) (a>b)?a:b
#define mi2(a,b) (a<=b)?a:b
#define fori(i,n) for(ll i=0;i<(ll)n;i++)
#define ford(i,n) for(ll i=n;i>=0;i--)
#define pll pair<ll,ll>
#define mod 1000000007
#define ff first
#define ss second
using namespace std;
#define MAXI 1e9
#define MAX_LIMIT 500001

void solve()
{
	string s;
	cin>>s;
	ll cn=0;
	for(int i=1;i<=3;i++)
	{
		if(cn==3)
		{
			break;
		}
		cout<<s[i%3];
		cn++;
	}
	cout<<"\n";

}

int main()
{

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

    ll T;
    T=1;
    //cin>>T;

    fori(_,T)
    {
        solve();
    }

}


#include <bits/stdc++.h>
#define all(vec) vec.begin(), vec.end()
#define pb push_back
#define eb emplace_back
#define fi first
#define se second
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
template <class T>
using V = vector<T>;
template <class T>
inline void chmin(T &a, const T &b) { a = min(a, b); }
template <class T>
inline void chmax(T &a, const T &b) { a = max(a, b); }
template <class T>
inline bool kbit(const T &x, const int &k) { return ((x >> k) & 1LL); }
inline int popcount(const int &n) { return __builtin_popcount(n); }
inline ll popcountll(const ll &n) { return __builtin_popcountll(n); }
inline ll mask(const ll &k) { return (1LL << k) - 1LL; }
template <class T>
void zip(V<T> &v) {
    sort(all(v));
    v.erase(unique(all(v)), v.end());
}
template <class T>
int lwb(V<T> &v, const T &x) { return lower_bound(all(v), x) - v.begin(); }
template <class T>
int upb(V<T> &v, const T &x) { return upper_bound(all(v), x) - v.begin(); }
void dump() {
    cerr << '\n';
}
template <class Head, class... Tail>
void dump(Head &&head, Tail &&...tail) {
    cerr << head << (sizeof...(Tail) == 0 ? " " : ", ");
    dump(std::move(tail)...);
}
template <class T>
void print(const vector<T> &v) {
    for (int i = 0; i < v.size(); i++) cout << v[i] << (i + 1 == v.size() ? '\n' : ' ');
}
template <class T>
void read(vector<T> &v) {
    for (int i = 0; i < v.size(); i++) cin >> v[i];
}
constexpr char sp = ' ', newl = '\n';
constexpr int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
constexpr ll INF = (1LL << 60) - 1LL;
constexpr ll MOD = 998244353LL;
//////////////////////////////////////////////INSERT ABOVE HERE
int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    int n;
    cin >> n;
    string s;
    cin >> s;
    V<int> c(n + 1, -1);
    for (int i = 0; i <= n; i++) {
        bool f = false;
        if (i == 0 && s[0] == '<') {
            f = true;
        } else if (i == n && s[n - 1] == '>') {
            f = true;
        } else if (0 < i && i < n && s[i - 1] == '>' && s[i] == '<') {
            f = true;
        }
        if (!f) continue;
        c[i] = 0;
        for (int j = i - 1; j >= 0; j--) {
            if (s[j] == '<') break;
            chmax(c[j], c[j + 1] + 1);
        }
        for (int j = i + 1; j <= n; j++) {
            chmax(c[j], c[j - 1] + 1);
            if (s[j] == '>') break;
        }
    }
    V<int> a(n + 1);
    read(a);
    int k = 1 << 30;
    for (int i = 0; i <= n; i++) {
        if (c[i] > 0) chmin(k, a[i] / c[i]);
    }
    for (int i = 0; i < n; i++) {
        chmin(k, abs(a[i + 1] - a[i]));
    }
    cout << k << newl;
    for (int i = 0; i < k; i++) {
        for (int j = 0; j <= n; j++) {
            if (i < a[j] % k) {
                cout << (a[j] / k) + 1;
            } else {
                cout << (a[j] / k);
            }
            if (j < n) cout << " ";
        }
        cout << newl;
    }
}

#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
#define FOR(i,m,n) for(int i=(m);i<(n);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
using ll = long long;
constexpr int INF = 0x3f3f3f3f;
constexpr long long LINF = 0x3f3f3f3f3f3f3f3fLL;
constexpr double EPS = 1e-8;
constexpr int MOD = 1000000007;
// constexpr int MOD = 998244353;
constexpr int dy[] = {1, 0, -1, 0}, dx[] = {0, -1, 0, 1};
constexpr int dy8[] = {1, 1, 0, -1, -1, -1, 0, 1}, dx8[] = {0, -1, -1, -1, 0, 1, 1, 1};
template <typename T, typename U> inline bool chmax(T &a, U b) { return a < b ? (a = b, true) : false; }
template <typename T, typename U> inline bool chmin(T &a, U b) { return a > b ? (a = b, true) : false; }
struct IOSetup {
  IOSetup() {
    std::cin.tie(nullptr);
    std::ios_base::sync_with_stdio(false);
    std::cout << fixed << setprecision(20);
  }
} iosetup;

int main() {
  int n; string s; cin >> n >> s;
  vector<int> a(n + 1); REP(i, n + 1) cin >> a[i];
  int k = INF;
  REP(i, n) chmin(k, abs(a[i + 1] - a[i]));
  cout << k << '\n';
  REP(i, k) REP(j, n + 1) cout << (a[j] + i) / k << " \n"[j == n];
  return 0;
}


#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using ld = long double;
using uint = unsigned int;
using ull = unsigned long long;
using pii = pair<int, int>;

/* [💭] [💡] [🎈] */

ll fibo[88];
bitset<88> f;

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

#ifdef _SHIFTPSH
    freopen("_run/in.txt", "r", stdin), freopen("_run/out.txt", "w", stdout);
#endif

    ll n;
    cin >> n;

    ll tn = n;

    fibo[0] = fibo[1] = 1;
    for (int i = 2; i <= 87; i++) fibo[i] = fibo[i - 1] + fibo[i - 2];

    vector<int> v;
    while (n) {
        int i = upper_bound(fibo, fibo + 88, n) - fibo - 1;
        v.emplace_back(i);
        n -= fibo[i];
    }

    int m = v[0];
    for (int i = 1; i < v.size(); i++) f[m - v[i]] = true;

    vector<int> ops;
    ops.emplace_back(1), ops.emplace_back(2);

    ll x = 0, y = 0;
    x++;
    y++;
    for (int i = 1; i < m; i++) {
        if (i & 1) {
            x += y;
            ops.emplace_back(3);
        } else {
            y += x;
            ops.emplace_back(4);
        }
        if (f[i + 1]) {
            if (i & 1) {
                x++;
                ops.emplace_back(1);
            } else {
                y++;
                ops.emplace_back(2);
            }
        }
    }

    cout << ops.size() << '\n';
    for (int o:ops) {
        if (x == tn) {
            cout << o << '\n';
        } else {
            cout << ((o - 1) ^ 1) + 1 << '\n';
        }
    }

    return 0;
}

#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define st first
#define nd second
#define pii pair<int,int>
#define piii pair<int,pii>
#define sp " "
#define nl "\n"
#define all(x) x.begin(),x.end()
#define fastio() ios_base::sync_with_stdio(0);cin.tie(0);
#define ll long long

using namespace std;

const int N = 2e5+5;
const ll INF = 1e18+5;
const int mod = 1e9+7;

int n;
string s;
map<int,int> m;

signed main(){
    #ifndef ONLINE_JUDGE
        freopen("in.txt","r",stdin);
        freopen("out.txt","w",stdout);
    #endif
    fastio()
    cin >> s;
    n=s.size();
    for(int i=0;i<n;i++){
        m[s[i]-'0']++;
    }
    if(n==1){
        cout << (s[0]=='8'||s[0]=='0'?"Yes\n":"No\n");
        return 0;
    }
    if(n==2){
        if(((s[0]-'0')*10+s[1]-'0')%8==0||((s[1]-'0')*10+s[0]-'0')%8==0)
            cout << "Yes\n";
        else
            cout << "No\n";
        return 0;
    }
    for(int i=104;i<1000;i+=8){
        int a=i/100;
        int b=i/10-a*10;
        int c=i%10;
        // cout << a << b << c << nl;
        if(a==b&&a==c){
            if(m[a]>=3){
                cout << "Yes";
                return 0;
            }
        }
        else if(a==b){
            if(m[a]>=2&&m[c]>=1){
                cout << "Yes";
                return 0;
            }
        }
        else if(a==c){
            if(m[a]>=2&&m[b]>=1){
                cout << "Yes";
                return 0;
            }
        }
        else if(b==c){
            if(m[b]>=2&&m[a]>=1){
                cout << "Yes";
                return 0;
            }
        }
        else{
            if(m[a]>=1&&m[b]>=1&&m[c]>=1){
                cout << "Yes";
                return 0;
            }
        }
    }
    cout << (m[0]>=3?"Yes\n":"No\n");
}


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

void solution()
{
  int h, w; cin >> h >> w;
  long long output = 1;
  int values[h + w][3] = {};
  for(int i = 0; i < h; i++)
  {
    string s; cin >> s;
    for(int j = 0; j < w; j++)
    {
      if(s[j] == '.')
      {values[i + j][0]++;}
      else if(s[j] == 'R')
      {values[i + j][1]++;}
      else
      {values[i + j][2]++;}
    }
  }
  for(int i = 0; i < h + w; i++)
  {
    if(values[i][0] && values[i][1] == 0 && values[i][2] == 0)
    {output *= 2;}
    else if(values[i][1] && values[i][2])
    {output *= 0;}
    output %= 998244353;
  }
  cout << output << endl;
  return;
}
int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int count, counter = 0;
  count = 1;
  while(counter++ < count)
  {solution();}
  return 0;
}

#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double db;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define pll pair<ll,ll>
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define ub(v,val) upper_bound(v.begin(),v.end(),val)
#define np(str) next_permutation(str.begin(),str.end())
#define lb(v,val) lower_bound(v.begin(),v.end(),val)
#define sortv(vec) sort(vec.begin(),vec.end())
#define rev(p) reverse(p.begin(),p.end());
#define v vector
#define len length()
#define repc(i,s,e) for(ll i=s;i<e;i++)
#define fi first
#define se second
#define mset(a,val) memset(a,val,sizeof(a));
#define mt make_tuple
#define repr(i,n) for(i=n-1;i>=0;i--)
#define rep(i,n) for(i=0;i<n;i++)
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define at(s,pos) *(s.find_by_order(pos))
#define set_ind(s,val) s.order_of_key(val)
long long int M = 1e9 + 7 ;
long long int inf = 9 * 1e18;
const double PI = acos(-1);
//CLOCK
ll begtime = clock();
#define time() cout << "\n\nTime elapsed: " << (clock() - begtime)*1000/CLOCKS_PER_SEC << " ms\n\n";
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
//CLOCK ENDED
ll n, m;
// modular exponentiation
ll binpow(ll val, ll deg)
{
	if (deg < 0)
		return 0;
	if (!deg)
		return 1 % M;
	if (deg & 1)
		return binpow(val, deg - 1) * val % M;
	ll res = binpow(val, deg >> 1);
	return (res * res) % M;
}
//binomial
ll modinv(ll n) {
	return binpow(n, M - 2);
}

ll dp[3005][3005], ways[3005][3005];

int main() {
	// your code goes here
	IOS;
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ll i, j, t, k, x, y, z, N;

	//dp[i][j] denotes ith index tak aur j groups

	//ways[i][j] sum%i==j

	mset(dp, 0);
	mset(ways, 0);

	dp[0][0] = 1;

	ll sum = 0;

	ways[1][0] = 1;
	cin >> n;
	ll a[n];
	rep(i, n) cin >> a[i];

	rep(i, n) {
		sum += a[i];
		repr(j, n) {
			ll rem = sum % (j + 1);
			(dp[i + 1][j + 1] += ways[j + 1][rem]) %= M;
			(ways[j + 2][sum % (j + 2)] += dp[i + 1][j + 1]) %= M;
		}
	}
	// rep(i, n + 1) {
	// 	rep(j, n + 1) {
	// 		debug(i, j, dp[i][j]);
	// 	}
	// }
	ll ans = 0;
	for (i = 1; i <= n; i++) (ans += dp[n][i]) %= M;
	cout << ans;

	return 0;

}


#include <iostream>
#include <string.h>
#include <algorithm>
#include <iomanip>
#include <cmath>
#include <map>
using namespace std;
#include <vector>
#include <queue>
#include <numeric>

#define MM (1000000000 + 7)

typedef unsigned long long ull;
vector<vector<int>> A[200000 + 1];

ull ans;
ull N;
ull a, b, c;

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

	int i, j, k;

	ans = -1;

	cin >> N;
	for (i = 0; i < 63; i++) {
		a = N >> i;
		b = i;
		c = N - (N >> i) * (1ULL << i);

		ans = min(ans, a + b + c);
	}
	cout << ans << '\n';

	return 0;
}

                   /**Bismillahir Rahmanir Rahim.**/
/*
         Md.Fagun Molla
         18ICTCSE006
         BSMRSTU(SHIICT)
*/
#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;
using ll=long long;
using db=double;
///***************************************************** CONSTANTS ******************************************************///

int const N=1e6+3;
ll MOD=1e9+7,fact[N];
const long long inf=(long long)1e18;
const long double PI=3.14159265358979;

///************************************************ CONTAINER DEFINITIONS ***********************************************///

typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int,int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vii;
typedef vector<pll> vll;

///************************************************ SHORT FORM KEYWORDS *************************************************///

#define PB push_back

#define F first
#define S second
#define MP make_pair
#define I insert
#define lb lower_bound
#define ub upper_bound
#define endl '\n'

///************************************************ SHORT FORM FUNCTIONS ************************************************///

#define loop(a,b) for(ll i=a;i<b;i++)
#define loopr(a,b) for(ll i=a-1;i>=b;i--)
#define mem(a,b) memset(a, b, sizeof(a) )
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) (a*(b/gcd(a,b)))
#define sa(v) sort(v.begin(),v.end())
#define sd(v) sort(v.begin(),v.end(),greater<>())
#define rev(s) reverse(s.begin(),s.end())
#define stll(x) stoll(x, nullptr, 10);
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
#define mx(a) *max_element(all(a))
#define mn(a) *min_element(all(a))
#define all(a) a.begin(),a.end()
#define mxa(a,N) *max_element(a,a+N)
#define mna(a,N) *min_element(a,a+N)
#define print(a) {for(auto x:a)cout<<x<<" ";cout<<endl;}
#define io() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);

///************************************************ SOLUTION STARTS HERE ************************************************///
///======================================================================================================================///

void solve(){
	int n; cin>>n;
	int aa[n],bb[n];
	for(int i=0; i<n; i++) cin>>aa[i];
	for(int i=0; i<n; i++) cin>>bb[i];
	bool f=true;
	int c=0;

	for(int i=1; i<=1000; i++) {
		f=true;
		for(int j=0; j<n; j++) {
			if(aa[j]<=i && bb[j]>=i) continue;
			else {
				f=false;
				break;
			}
		}
		if(f) {
			c++;
		}
	}
	cout<<c<<endl;
}
int main()
{
   	io();
    int T=1;//cin>>T;
    while(T--) solve();
    return 0;
}

/**************************************************ALHAMDULILLAH************************************************/


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

const int N=2e5+5;

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

int n;
char s1[N],s2[N],s3[N];

int main()
{
	int T=read();
	while(T--)
	{
		n=read();
		scanf("%s",s1+1); scanf("%s",s2+1); scanf("%s",s3+1);
		for(int i=1;i<=n;i++) printf("0");
		for(int i=1;i<=n;i++) printf("1");
		printf("0\n");
	}
	return 0;
}

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

#define faster      ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define pi          acos(-1.0)
#define nl          '\n'

/**-------Library-------*/
#define mem(a,b)       memset(a,b,sizeof(a))
#define all(a)         a.begin(),a.end()
#define Sort(x)        sort(x.begin(),x.end())
#define Reverse(x)     reverse(x.begin(),x.end())
#define SortA(ar,s)    sort(ar,ar+s)
#define SortD(ar,s)    sort(ar,ar+s,greater<int>())
#define maxa(A,n)        *max_element(A,A+n)
#define minall(A,n)      *min_element(A,A+n)
#define gcd(a,b)       __gcd(a,b)
#define lcm(a,b)       (a*(b/gcd(a,b)))
#define sq(x)          (x)*(x)

#define fr0(i, n)      for(int i=0; i<n; i++)
#define fr1(i, n)      for(int i=1; i<=n; i++

#define min3(a,b,c)       min(a,min(b,c))
#define min4(a,b,c,d)     min(a,min(b,min(c,d)))
#define max3(a,b,c)       max(a,max(b,c))
#define max4(a,b,c,d)     max(a,max(b,max(c,d)))
#define ABS(x)            ((x)<0?-(x):(x))
#define pb(x)             push_back(x)
#define mod               1000000007
#define precision(x)      cout<<fixed<<setprecision(x)
#define end               cout<<nl
#define yes               cout<<"YES"<<nl
#define no                cout<<"NO"<<nl

/**----------Graph Moves----------*/
const int fx[] = {+1,-1,+0,+0};                         // 4 X directions
const int fy[] = {+0,+0,+1,-1};                         // 4 Y directions
const int fx8[] = {+0,+0,+1,-1,-1,+1,-1,+1};            // King X Moves
const int fy8[] = {-1,+1,+0,+0,+1,+1,-1,-1};            // King Y Moves
const int kx[] = {-2, -2, -1, -1,  1,  1,  2,  2};      // Knight X Moves
const int ky[] = {-1,  1, -2,  2, -2,  2, -1,  1};      // Knight Y Moves

/**------- Char Chk----------*/
bool isLow(char ch){if(ch>='a' && ch<='z') return true;return false;}
bool isUpp(char ch){if(ch>='A' && ch<='Z') return true;return false;}
bool isDig(char ch){if(ch>='0' && ch<='9') return true;return false;}

/**----data type----*/
typedef long long int ll;
typedef unsigned long long int  llu;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        ll n;
        cin>>n;
        if(n&1)
            cout<<"Odd"<<nl;
        else if((n/2)&1)
            cout<<"Same"<<nl;
        else cout<<"Even"<<nl;
    }
    return 0;
}


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

#define ll long long
#define forin(in ,n) for(ll i=0; i<n; i++) cin>>in[i]
#define forout(out) for(ll i=0; i<(ll)out.size(); i++) cout<<out[i]<<endl
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define rep_up(i, a, n) for (ll i = a; i < n; ++i)
#define rep_down(i, a, n) for (ll i = a; i >= n; --i)
#define P pair<ll, ll>

#define all(v) v.begin(), v.end()
#define fi first
#define se second
#define vvvll vector<vector<vector<ll>>>
#define vvll vector<vector<ll>>
#define vll vector<ll>
#define pqll priority_queue<ll>
#define pqllg priority_queue<ll, vector<ll>, greater<ll>>

constexpr ll INF = (1ll << 60);
//constexpr ll mod = 1000000007;
//constexpr ll mod = 998244353;

constexpr ll mod = 3;

constexpr double pi = 3.14159265358979323846;
template <typename T>
inline bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <typename T>
inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return 1;
    }
    return 0;
}
template <typename T>
void pt(T val) {
    cout << val << "\n";
}
template <typename T>
void pt_vll(vector<T> &v) {
    ll vs = v.size();
    rep(i, vs) {
        cout << v[i];

        if (i == vs - 1)
            cout << "\n";
        else
            cout << " ";
    }
}
ll mypow(ll a, ll n) {
    ll ret = 1;
    if(n==0) return 1;
    if(a==0) return 0;
    rep(i, n) {
        if (ret > (ll)(1e18 + 10) / a) return -1;
        ret *= a;
    }
    return ret;
}
long long modpow(long long a, long long n, long long mod) {
    long long res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}

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

const int MAX = 510000;
long long th[MAX], tw[MAX];
// テーブルを作る前処理
void COMinit() {
    th[1]=0; tw[1]=0;
    for (ll i = 2; i < MAX; i++){
        if(i%3==2) tw[i]=1;
        if(i%3==0){
            ll x=i;
            while(x%3==0){
                th[i]++;
                x/=3;
            }
            if(x%3==2) tw[i]=1;
        }
        tw[i]+=tw[i-1];
        th[i]+=th[i-1];
    }
}

// 二項係数計算
long long COM(ll n, ll k){
    if(th[n]>th[k]+th[n-k]) return 0;
    if((tw[n]-tw[k]-tw[n-k])%2==0) return 1;
    return 2;
}

int main() {
    ll n,m,k,sum=0,ans=0;
    string s;
    cin>>n>>s;
    COMinit();
    vll a(n);
    rep(i,n){
        if(s[i]=='W') a[i]=0;
        if(s[i]=='B') a[i]=1;
        if(s[i]=='R') a[i]=2;
        a[i]*=COM(n-1,i);
    }
    rep(i,n){
        sum+=a[i];
        sum%=mod;
    }
    if(n%2==0) sum=(3-sum)%3;
    if(sum%3==0) cout<<"W"<<endl;
    if(sum%3==1) cout<<"B"<<endl;
    if(sum%3==2) cout<<"R"<<endl;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int INF = 0x3f3f3f3f;
const LL mod = 1e9 + 7;
const int N = 2005;

char s[N][N];
int f[N][N];
int cal(char c) {
    return c == '+' ? 1 : -1;
}
int main() {
    int n, m;
    cin >> n >> m;
    for (int i = 1; i <= n; i++) {
        cin >> s[i] + 1;
    }
    for (int i = n; i >= 1; i--) {
        for (int j = m; j >= 1; j--) {
            if (i < n && j < m)
                f[i][j] = max(cal(s[i][j + 1]) - f[i][j + 1], cal(s[i + 1][j]) - f[i + 1][j]);
            else if (i < n) {
                f[i][j] = cal(s[i + 1][j]) - f[i + 1][j];
            } else if (j < m) {
                f[i][j] = cal(s[i][j + 1]) - f[i][j + 1];
            } else {
                f[i][j] = 0;
            }
        }
    }
    if (f[1][1] == 0)
        puts("Draw");
    else if (f[1][1] > 0)
        puts("Takahashi");
    else
        puts("Aoki");
    return 0;
}


#include <bits/stdc++.h>

int main(){
    int N;
    std::cin >> N;
    std::vector< int > T(N);
    int sum = 0;
    for(int i=0; i<N; i++){
        std::cin >> T[i];
        sum += T[i];
    }

    std::map< int, bool > mp;
    mp[0] = 1;

    for(int i=0; i<N; i++){
        std::vector< int > tmp;
        for(auto itr = mp.begin(); itr != mp.end(); itr++){
            tmp.push_back(itr->first + T[i]);
        }
        for(int j=0; j<tmp.size(); j++){
            mp[tmp[j]] = 1;
        }
    }

    int ans = 0;
    for(auto itr = mp.begin(); itr != mp.end(); itr++){
        if(abs(sum / 2 - ans) > abs(sum / 2 - itr->first)){
            ans = itr->first;
        }
    }

    std::cout << std::max(sum - ans, ans) << std::endl;

    return 0;
}

#include <cstdio>
#include <cstring>
#include <cmath>
#include <utility>
#include <iostream>
#include <functional>
#include <bitset>
#include <algorithm>
#include <vector>
#include <forward_list>
#include <set>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <tuple>
#include <numeric>
#include <cassert>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const ll MOD = 1e9 + 7;
const ll INF = (1ll << 60);

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

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

int main(void)
{
    ll n;
    cin >> n;
    vector<ll> t(n);

    ll s = 0;

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

    vector<vector<bool>> dp(n + 5, vector<bool>(100010, false));

    dp[0][0] = true;

    for (int i = 1; i <= n; i++)
    {
        dp[i][0] = true;
        for (int j = 0; j < 100005; j++)
        {
            dp[i][j] = dp[i - 1][j] | dp[i][j];
            if (j - t[i - 1] < 0)
            {
                continue;
            }

            dp[i][j] = dp[i - 1][j - t[i - 1]] | dp[i][j];
        }
    }

    ll ans = INF;

    for (ll i = 0; i < 100005; i++)
    {
        if (dp[n][i])
        {
            chmin(ans, max(s - i, i));
        }
    }

    // for (int i = 1; i <= n; i++)
    // {
    //     for (int j = 0; j < 26; j++)
    //     {
    //         cout << dp[i][j] << " ";
    //     }
    //     cout << endl;
    // }

    cout << ans << endl;
}


#include <iostream>
#include <bits/stdc++.h>
using namespace std;
typedef   long long int ll;
typedef long double db;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using ordered_multiset = tree<T, null_type, less_equal<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define pll pair<ll,ll>
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define ub(v,val) upper_bound(v.begin(),v.end(),val)
#define np(str) next_permutation(str.begin(),str.end())
#define lb(v,val) lower_bound(v.begin(),v.end(),val)
#define sortv(vec) sort(vec.begin(),vec.end())
#define rev(p) reverse(p.begin(),p.end());
#define v vector
#define pi 3.14159265358979323846264338327950288419716939937510
#define len length()
#define repc(i,s,e) for(ll i=s;i<e;i++)
#define fi first
#define se second
#define mset(a,val) memset(a,val,sizeof(a));
#define mt make_tuple
#define repr(i,n) for(i=n-1;i>=0;i--)
#define rep(i,n) for(i=0;i<n;i++)
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define at(s,pos) *(s.find_by_order(pos))
#define set_ind(s,val) s.order_of_key(val)
long long int M = 1e9 + 7 ;
long long int inf = 9 * 1e18;
//CLOCK
ll begtime = clock();
#define time() cout << "\n\nTime elapsed: " << (clock() - begtime)*1000/CLOCKS_PER_SEC << " ms\n\n";
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
//CLOCK ENDED
ll n, m;
// modular exponentiation
ll binpow(ll val, ll deg)
{
	if (deg < 0)
		return 0;
	if (!deg)
		return 1 % M;
	if (deg & 1)
		return binpow(val, deg - 1) * val % M;
	ll res = binpow(val, deg >> 1);
	return (res * res) % M;
}
//binomial
ll modinv(ll n) {
	return binpow(n, M - 2);
}

int main() {
	// your code goes here
	IOS;
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ll i, j, t, k, x, y, z,  N;
	cin >> n >> m;
	ll a[n];
	rep(i, n) {
		cin >> a[i];
	}
	ll cnt[n] = {0};
	set<ll> s;
	rep(i, n + 1) {
		s.insert(i);
	}
	rep(i, m) {
		s.erase(a[i]);
		cnt[a[i]]++;
	}
	ll mn = *s.begin();
	for (i = m; i < n; i++) {
		cnt[a[i - m]]--;
		if (cnt[a[i - m]] == 0) s.insert(a[i - m]);
		s.erase(a[i]);
		cnt[a[i]]++;
		mn = min(mn, *s.begin());
	}
	cout << mn;

	return 0;

}

#include<bits/stdc++.h>
using namespace std;
int a[2000001],sum[2000001],b[2000001];
int n,m,answ=99999999;
void add(int x,int v)
{
	while(x<=n+1)
	{
		a[x]+=v;
		x+=x&-x;
	}
}
int find(int x)
{
	int ans=0;
	while(x)
	{
		ans+=a[x];
		x-=x&-x;
	}
	return ans;
}
int query()
{
	int l=1,r=n+2,mid,ans=n+1;
	while(l<=r)
	{
		mid=(l+r)>>1;
		if(find(mid)==mid)l=mid+1;
		else r=mid-1,ans=mid;
	}
	return ans;
}
signed main()
{
	cin>>n>>m;
	for(int i=1;i<=n;i++)
	{
		cin>>b[i];
		b[i]++;
		sum[b[i]]++;
		if(sum[b[i]]==1)add(b[i],1);
		if(i-m>=1){sum[b[i-m]]--;if(!sum[b[i-m]])add(b[i-m],-1);}
		if(i-m+1>=1)answ=min(answ,query());
	}
	cout<<answ-1;
}


#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define int long long
int32_t main() {
    int n,k;
    cin>>n>>k;
    vector<pair<int,int>> v;

    for(int i=0;i<n;i++)
    {
        int a,b;
        cin>>a>>b;
        v.push_back({a,b});
    }
    sort(v.begin(),v.end());
    int p=0,av=k;
    for(int i=0;i<n;i++)
    {
        int dis=v[i].F-p;
        if(dis<=av)
        {
            av=av-dis;
            p=v[i].F;
            av+=v[i].S;
        }
        else
        {
            p=p+av;
            av=0;
            break;
        }
    }
    if(av>0)
    {
        p=p+av;
    }
    cout<<p;
	return 0;
}

#include <cstdio>
#include <climits>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <utility>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <list>
#include <set>
#include <bitset>
#include <iterator>

#define endl '\n'
#define fi first
#define se second
#define pb push_back
#define MOD 1000000007
#define len(vc) int(vc.size())
#define fore(x,vc) for(auto &x: vc)
#define all(vc) vc.begin(), vc.end()
#define allr(vc) vc.rbegin(), vc.rend()
#define forr(i,a,b) for(int i = a;i <= b;++i)
#define forn(i,n) for(int i = 0; i < int(n);++i)
#define gauss(n) (((n) * ((n) + 1)) / 2)

#ifdef LOCAL
#include "debugger.h"
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...)
#endif

using namespace std;

int main() {

	ios::sync_with_stdio(0);
	cin.tie(0);

	int N;
	int64_t cash;
	cin >> N >> cash;
	vector<pair<int64_t,int>> A(N);
	for(auto &[x,y]: A)
		cin >> x >> y;

	sort(all(A));
	int64_t ans = 0;
	for(auto &[x,y]: A) {
		int64_t dis = x - ans;
		debug(ans,cash,dis);
		if(dis <= cash) {
			ans += dis;
			cash -= dis;
			cash += y;
		} else {
			cout << ans + cash << endl;
			return 0;
		}
	}

	cout << ans + cash << endl;

	return 0;
}


#include <iostream>
#include <vector>
#include <map>
#include <bitset>
#include <algorithm>
#define ll long long
#define MODD 998244353
using namespace std;

char C[5222][5222];

ll modpow(ll x, ll y) {
    ll xs = x;
    ll answer = 1;
    while(y) {
        if (y&1) {
            answer = (answer * xs) % MODD;
        }
        y >>= 1;
        xs = (xs * xs) % MODD;
    }
    return answer;
}

ll dp[5555][5555];

ll Solve(int H,int W) {

    ll threeinv = modpow(3, MODD-2);
    ll two_threeinv = (2*threeinv)%MODD;

    for(int i=H+1;i>=1;i--)
        for(int j=W+1;j>=1;j--) {

            if (i>H || j>W) {
                dp[i][j]=0;
                continue;
            }
            if (i==H && j==W) {
                dp[i][j]=1;
                continue;
            }
            ll& ret=dp[i][j];
            if (C[i][j]=='X') {
                ret= (dp[i+1][j]+dp[i][j+1])%MODD;
            }
            if (C[i][j]=='D') {
                ret= dp[i+1][j];
            }
            if (C[i][j]=='R') {
                ret= dp[i][j+1];
            }

            if (C[i][j]=='?') {
                ret=two_threeinv*(dp[i+1][j]+dp[i][j+1])%MODD;
            }
            ret%=MODD;
        }
    return dp[1][1];
}

int main() {
    int H,W,K;
    cin>>H>>W>>K;

    for(int i=1;i<=H;i++)
        for(int j=1;j<=W;j++)
            C[i][j]='?';

    int ct=H*W;
    for(int i=1;i<=K;i++) {
        int x,y;
        cin>>x>>y;
        cin>>C[x][y];
        ct--;
    }

    for(int i=0;i<=H+1;i++)
        for(int j=0;j<=W+1;j++)
            dp[i][j]=-1;

    ll ans = Solve(H,W);
    for(int i=1;i<=ct;i++)
        ans=(ans*3)%MODD;
    cout << ans << endl;

}

#include <bits/stdc++.h>
#define lc (o<<1)
#define rc ((o<<1)|1)
using namespace std;
#define DebugP(x) cout << "Line" << __LINE__ << " " << #x << "=" << x << endl

typedef long long LL;
typedef complex<double> Comp;

const int maxn = 100 + 5;
const int inf = 0x3f3f3f3f;
const int modu = 1e9 + 7;

bool g[maxn][maxn];
LL a[maxn];

struct Matrix {
	LL a[maxn][maxn];
	int n, m;

	Matrix(int n=0, int m=0):
		n(n), m(m) { memset(a, 0, sizeof(a)); }

	Matrix operator*(const Matrix &op) {
		Matrix res(n, op.m);
		for (int i = 0; i < res.n; ++i)
			for (int j = 0; j < res.m; ++j)
				for (int k = 0; k < m; ++k)
					res.a[i][j] = (res.a[i][j] + a[i][k]*op.a[k][j]) % modu;
		return res;
	}
}x, trans;

int n, m, k;
int deg[maxn];

LL qpow(int a, int n) {
	LL b = a;
	LL res = 1;
	while (n) {
		if (n&1) res = res*b%modu;
		b = b*b % modu;
		n >>= 1;
	}
	return res;
}

int main() {
	// freopen("input.txt", "r", stdin);
	ios::sync_with_stdio(0);
	cin.tie(0);
	memset(g, 0, sizeof(g));
	cin >> n >> m >> k;
	x.n = n;
	x.m = 1;
	for (int i = 0; i < n; ++i)
		cin >> x.a[i][0];
	memset(deg, 0, sizeof(deg));
	for (int i = 0; i < m; ++i) {
		int u, v;
		cin >> u >> v;
		u--; v--;
		g[u][v] = g[v][u] = true;
		deg[u]++;
		deg[v]++;
	}
	LL invm = qpow(2*m, modu-2);
	for (int i = 0; i < n; ++i)
		for (int j = 0; j < n; ++j)
			if (g[i][j]) trans.a[i][j] = invm;
	for (int i = 0; i < n; ++i) trans.a[i][i] = ((1 - invm*deg[i])%modu+modu)%modu;
	trans.n = trans.m = n;
	Matrix ans(n, n);
	for (int i = 0; i < n; ++i) ans.a[i][i] = 1;
	while (k) {
		if (k&1) ans = ans*trans;
		trans = trans*trans;
		k >>= 1;
	}
	x = ans*x;
	for (int i = 0; i < n; ++i)
		cout << x.a[i][0] << "\n";
	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#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);
#define VSORT(v) sort(v.begin(), v.end());
#define VSORTR(v) sort(v.rbegin(), v.rend());
#define ALL(v) (v).begin(),(v).end()

using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
using P = pair<ll, ll>;

template<typename T> using min_priority_queue = priority_queue<T, vector<T>, greater<T>>;
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 = 1e9 + 7;
const ll INF = 1e18;

int main(){
	cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);

    ll n;
    cin >> n;
    vll a(n);
    REP(i, n) {
        cin >> a[i];
    }
    VSORT(a);
    ll res = a[0] + 1;
    REP(i, n - 1) {
        res *= (a[i + 1] - a[i] + 1);
        res %= MOD;
    }
    cout << res << endl;
    return 0;
}

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <bitset>
using namespace std;

#ifdef LOCAL
	#define eprintf(...) fprintf(stderr, __VA_ARGS__);fflush(stderr);
#else
	#define eprintf(...) 42
#endif

using ll = long long;
using ld = long double;
using uint = unsigned int;
using ull = unsigned long long;
template<typename T>
using pair2 = pair<T, T>;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
	return (ull)rng() % B;
}

#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second

clock_t startTime;
double getCurrentTime() {
	return (double)(clock() - startTime) / CLOCKS_PER_SEC;
}

const ll MOD = (ll)1e9 + 7;
ll add(ll x, ll y) {
	x += y;
	if (x >= MOD) return x - MOD;
	return x;
}
ll sub(ll x, ll y) {
	x -= y;
	if (x < 0) return x + MOD;
	return x;
}
ll mult(ll x, ll y) {
	return (x * y) % MOD;
}
ll bin_pow(ll x, ll p) {
	if (p == 0) return 1;
	if (p & 1) return mult(x, bin_pow(x, p - 1));
	return bin_pow(mult(x, x), p / 2);
}
ll rev(ll x) {
	return bin_pow(x, MOD - 2);
}

const int N = 100100;
int n;
int a[N];

int main()
{
	startTime = clock();
//	freopen("input.txt", "r", stdin);
//	freopen("output.txt", "w", stdout);

	scanf("%d", &n);
	for (int i = 0; i < n; i++)
		scanf("%d", &a[i]);
	a[n++] = 0;
	sort(a, a + n);
	ll ans = 1;
	for (int i = 1; i < n; i++)
		ans = mult(ans, a[i] - a[i - 1] + 1);
	printf("%lld\n", ans);

	return 0;
}


#pragma GCC optimize("O3")
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using P=pair<ll,ll>;
template<class T> using V=vector<T>;
#define fi first
#define se second
#define all(v) (v).begin(),(v).end()
const ll inf=(1e18);
//const ll mod=998244353;
const ll mod=1000000007;
ll GCD(ll a,ll b) {return b ? GCD(b,a%b):a;}
ll LCM(ll c,ll d){return c/GCD(c,d)*d;}
struct __INIT{__INIT(){cin.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(15);}} __init;
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
template<class T>void debag(const vector<T> &a){cerr<<"debag :";for(auto v:a)cerr<<v<<" ";cerr<<"\n";}
template<class T>void print(const vector<T> &a){for(auto v:a)cout<<v<<" ";cout<<"\n";}
int main(){
    ll n;
    cin>>n;
    V<ll> a(n),sum(n+1,0);
    ll v=0;
    for(int i=0;i<n;i++){
         cin>>a[i];
         a[i]*=2;
         v+=a[i];
    }
    sort(all(a));
    for(int i=0;i<n;i++){
          sum[i+1]+=sum[i]+a[i];
    }
    ll ans=inf;
    for(int i=0;i<n;i++){
          ll id=lower_bound(all(a),a[i])-a.begin();
          ll res=(sum[n]-sum[id])-(n-id)*a[i]+n*(a[i]/2);
          chmin(ans,res);
    }
    cout<<double(ans)/double(2*n)<<"\n";
}

#include<bits/stdc++.h>
using namespace std;
#define sz(x) (int)(x).size()
#define int long long int
#define loop(i,a,b) for(int i=a;i<b;i++)
#define scan(arr,n) for (int i = 0; i < n; ++i) cin >> arr[i]
#define vi vector<int>
#define si set<int>
#define pii pair <int, int>
#define sii set<pii>
#define vii vector<pii>
#define mii map <int, int>
#define pb push_back
#define ff first
#define ss second
#define all(aa) aa.begin(), aa.end()
#define rall(a) a.rbegin() , a.rend()
#define read(a,b) int a,b;  cin>>a>>b
#define readt(a,b,c) int a,b,c; cin>>a>>b>>c
#define readf(a,b,c,d) int a,b,c,d; cin>>a>>b>>c>>d;
#define print(v) for(auto x:v) cout<<x<<" ";cout<<endl
#define printPair(res) for(pair<int,int>& p:res) cout<<p.first<<" "<<p.second<<endl;
#define faster ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)

const int N=2E6+5;
multiset<int> mn[N];

void solve(int test)
{
  int n;cin>>n;
  cout<<fixed<<setprecision(6);
  double val=0.0;
  for(int i=1;i<n;i++)
  {
    val+= (n*1.0/i *1.0);
  }
  cout<<val;
}

int32_t main()
{
      #ifndef ONLINE_JUDGE
          freopen("input.txt", "r", stdin);
          freopen("output.txt", "w", stdout);
      #endif
      faster;
      //fact(mod);
      int t=1;
     // cin>>t;
      for(int test=1;test<=t;test++)
      {
          solve(test);
      }
}


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

const long double pai = acos(-1);
struct vect{
	long double x, y;
	vect(double _x = 0, double _y = 0) { x = _x, y = _y; }
	vect operator* (double k) { return vect{x * k, y * k}; }
	vect operator+ (vect A) { return vect(x + A.x, y + A.y); }
	vect operator- (vect A) { return vect(x - A.x, y - A.y); }
	double operator* (vect A) { return x * A.x + y * A.y; }
	double operator/ (vect A) { return x * A.y - y * A.x; }
	bool operator== (vect A) { return x == A.x && y == A.y; }
	vect rotate(double a){ return vect { x * cos(a) - y * sin(a), x * sin(a) + y * cos(a)}; }
};
int n;
vect v0, vn, vo, vx;

int main(){
	cin >> n >> v0.x >> v0.y >> vn.x >> vn.y;
	vo = (v0 - vn) * 0.5 + vn;
// fprintf(stderr, "%.8lf %.8lf\n", vo.x, vo.y);
	v0 = v0 - vo; vn = vn - vo;
	// fprintf(stderr, "%.8lf %.8lf %.8lf %.8lf", v0.x, v0.y, vn.x, vn.y);
	vx = v0.rotate(2.0 * pai / n);
	vx = vx + vo;
	// printf("%.8lf %.8lf", vx.x, vx.y);
cout.setf(ios::showpoint); 	cout.precision(11);
	cout << vx.x << " " << vx.y;
}

#include<bits/stdc++.h>
using namespace std;
#pragma region atcoder
//#include <atcoder/convolution>
//using namespace atcoder;
//using mint = modint998244353;
//using mint = modint1000000007;
#pragma endregion
#pragma region macros
using ll = long long;
using PII = pair<int, int>;
using PLL = pair<ll, ll>;
template <class T> using V = vector<T>;
template <class T> using VV = V<V<T>>;
#define overload4(_1,_2,_3,_4,name,...) name
#define overload3(_1,_2,_3,name,...) name
#define rep1(n) for(ll i=0;i<n;++i)
#define rep2(i,n) for(ll i=0;i<n;++i)
#define rep3(i,a,b) for(ll i=a;i<b;++i)
#define rep4(i,a,b,c) for(ll i=a;i<b;i+=c)
#define rep(...) overload4(__VA_ARGS__,rep4,rep3,rep2,rep1)(__VA_ARGS__)
#define rrep1(n) for(ll i=n;i--;)
#define rrep2(i,n) for(ll i=n;i--;)
#define rrep3(i,a,b) for(ll i=b;i-->(a);)
#define rrep(...) overload3(__VA_ARGS__,rrep3,rrep2,rrep1)(__VA_ARGS__)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) ((int)(x).size())
#define pb push_back
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define fi first
#define se second
#pragma endregion
#pragma region debug for var, v, vv
#define debug(var)  do{std::cerr << #var << " : ";view(var);}while(0)
template<typename T> void view(T e){std::cerr << e << std::endl;}
template<typename T> void view(const std::vector<T>& v){for(const auto& e : v){ std::cerr << e << " "; } std::cerr << std::endl;}
template<typename T> void view(const std::vector<std::vector<T> >& vv){cerr << endl;int cnt = 0;for(const auto& v : vv){cerr << cnt << "th : "; view(v); cnt++;} cerr << endl;}
#pragma endregion
#pragma region int128
std::ostream &operator<<(std::ostream &dest, __int128_t value) {
  std::ostream::sentry s(dest);
  if (s) {
    __uint128_t tmp = value < 0 ? -value : value;
    char buffer[128];
    char *d = std::end(buffer);
    do {
      --d;
      *d = "0123456789"[tmp % 10];
      tmp /= 10;
    } while (tmp != 0);
    if (value < 0) {
      --d;
      *d = '-';
    }
    int len = std::end(buffer) - d;
    if (dest.rdbuf()->sputn(d, len) != len) {
      dest.setstate(std::ios_base::badbit);
    }
  }
  return dest;
}
#pragma endregion
const ll mod = 1000000007;
const int inf = 1001001001;
const ll INF = 1001001001001001001ll;

int dx[]={1,0,-1,0};
int dy[]={0,1,0,-1};
template<class T, class K>bool chmax(T &a, const K b) { if (a<b) { a=b; return 1; } return 0; }
template<class T, class K>bool chmin(T &a, const K b) { if (b<a) { a=b; return 1; } return 0; }
ll rudiv(ll a, ll b) { return a/b+((a^b)>0&&a%b); } //  20 / 3 == 7
ll rddiv(ll a, ll b) { return a/b-((a^b)<0&&a%b); } // -20 / 3 == -7
ll power(ll a, ll p){ll ret = 1; while(p){if(p & 1){ret = ret * a;} a = a * a; p >>= 1;} return ret;}
ll modpow(ll a, ll p, ll m){ll ret = 1; while(p){if(p & 1){ret = ret * a % m;} a = a * a % m; p >>= 1;} return ret;}
/*---------------------------------------------------------------------------------------------------------------------------------*/
const double pi = acos(-1);
int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(20);
    int n; cin >> n;
    double a, b, c, d; cin >> a >> b >> c >> d;
    double cx = (a + c) / 2.0, cy = (b + d) / 2.0;
    double dx = a - cx, dy = b - cy;
    double theta = 2*pi/n;
    cout << cx + cos(theta)*dx - sin(theta)*dy << " " << cy + sin(theta)*dx + cos(theta)*dy << endl;
}
/*
   * review you code when you get WA (typo? index?)
   * int overflow, array bounds
   * special cases (n=1?)
*/


#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<cmath>
#include<iomanip>
#include<map>
#include<stack>
#include<queue>
using namespace std;
using P = pair<int,int>;
using ll = long long;

const long double EPS = 1e-10;

int main(){

  ll N;
  ll ans = 0;

  cin >> N;
  if(N <= 999){
    cout << ans << endl;
  }
  else if(N <= 999999){
    cout << 1 * (N-999) << endl;
  }
  else if(N <= 999999999LL){
    ans = 999000LL;
    cout << ans + 2 * (N-999999LL) << endl;
  }
  else if(N <= 999999999999LL){
    ans = 999000LL;
    ans += 2 * (999000000LL);
    cout << ans + 3 * (N-999999999LL) << endl;
  }
  else if(N <= 999999999999999LL){
    ans = 999000LL;
    ans += 2 * (999000000LL);
    ans += 3 * (999000000000LL);
    cout << ans + 4 * (N-999999999999LL) << endl;
  }
  else{
    ans = 999000LL;
    ans += 2 * (999000000LL);
    ans += 3 * (999000000000LL);
    ans += 4 * (999000000000000LL);
    cout << ans + 5 << endl;
  }

}

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

#define repr(i,a,b) for (int i=a; i<b; i++)
#define rep(i,n) for (int i=0; i<  n; i++)
#define PI 3.14159265359
const long long INF = 1LL << 60;
long long MOD = 1000000007;
long long gcd(long long a, long long b) { return b ? gcd(b, a%b) : a; }
long long lcm (int a, int b){return  (long long) a*b /gcd(a,b);}
double radian(double degree){return degree * PI /180.0;}
double degree(double radian){return radian * 180.0/PI;}

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

    int ans = 0;
    rep(i,S.length()){
        if (S.substr(i, 4) == "ZONe") ans++;
    }
    cout << ans << endl;
}


#include <iostream>

using namespace std;

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

  if((T >= 0 && A <= 100) && (C == 0 || C == 1))
  {
  	C == 0 ? (T > A ? cout<<"Takahashi" : cout<<"Aoki") : (A > T ? cout<<"Aoki" : cout<<"Takahashi") ;
  }
  return 0;
}

/* Hardwork allways pays off */
//You never know how close to the solution you are ,so keep practicing
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp>
#include <functional> // for less
#include <iostream>
using namespace __gnu_pbds;
using namespace std;

#define int long long

#define ld long double
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define pii pair<int,int>
#define endl '\n'
#define REP(i,n) for(int i=1;i<=n;i++)
#define tol(s) transform(s.begin(),s.end(),s.begin(),::tolower)
#define tou(s) transform(s.begin(),s.end(),s.begin(),::toupper)
#define ios ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define all(x) (x).begin(), (x).end()
#define mod1 998244353
#define mod 1000000007
#define pie 3.141592653589793238
#define printv(x) for(i=0;i<x.size();i++) cout<<x[i]<<" ";
#define printA(x,n) for(i=0;i<n;i++) cout<<x[i]<<" ";
#define F first
#define S second
#define vi vector<int>
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> new_data_set;

void make_unique(vector<int> vec)
{
sort(all(vec));
vec.resize(unique(all(vec)) - vec.begin());
}

bool isPowerOfTwo(int n)
{
   if(n==0)
   return false;

   return (ceil(log2(n)) == floor(log2(n)));
}
int cceil(int x, int y){
    return (x+y-1)/y;
}
struct Cmp
{
        bool operater(const pair<int,int> &a,const pair<int,int> &b)
       {
               return (a.second)<(b.second);
       }

};
bool cmp(const pair<int,int> &a,const pair<int,int> &b)
{
       return (a.second)<(b.second);
}
signed main()
 {   ios;
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
    #endif
    // cout.precision(1);
    // cout<<fixed;
    int t=1;
    // init();
      // cin>>t;
    while(t--)
    {
        int n,x,i,j,flag=0,count=0;
        int a,b,c;
        cin>>a>>b>>c;
        if(a==0&&b==0&&c==1)
          cout<<"Takahashi"<<endl;
        else if(c==0)
        {
          // a--;

          while(a!=0&&b!=0)
          {
            if(i%2==0)
            {a--;
             i++;
            }
            else
            {b--;
              i++;
            }
          }
          if(a>0)
            cout<<"Takahashi"<<endl;
          else
            cout<<"Aoki"<<endl;

        }
        else
        {
            // b--;

          while(a!=0&&b!=0)
          {
            if(i%2==0)
            {b--;
             i++;
            }
            else
            {a--;
              i++;
            }
          }
          if(a>0)
            cout<<"Takahashi"<<endl;
          else
            cout<<"Aoki"<<endl;

        }
    }
    return 0;

}


//Never stop trying
#include "bits/stdc++.h"
using namespace std;
#define boost ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)

typedef long long ll;
#define int ll
typedef string str;
typedef long double ld;
typedef pair<int, int> pi;
#define fi first
#define se second
typedef vector<int> vi;
typedef vector<pi> vpi;
#define pb push_back
#define eb emplace_back
#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define endl "\n"
#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define ROF(i,a,b) for (int i = (b)-1; i >= (a); --i)

const int MOD = 1e9 + 7; //998244353
const ll INF = 1e18;
const int MX = 2e5 + 10;
const int nx[4] = {0, 0, 1, -1}, ny[4] = {1, -1, 0, 0}; //right left down up

template<class T> using V = vector<T>;
template<class T> bool ckmin(T& a, const T& b) { return a > b ? a = b, 1 : 0; }
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }
ll cdiv(ll a, ll b) { return a / b + ((a ^ b) > 0 && a % b); } // divide a by b rounded up
//constexpr int log2(int x) { return 31 - __builtin_clz(x); } // floor(log2(x))

mt19937 rng(chrono::system_clock::now().time_since_epoch().count());
//mt19937_64 rng(chrono::system_clock::now().time_since_epoch().count());
ll random(ll a, ll b){
    return a + rng() % (b - a + 1);
}
#ifndef LOCAL
#define cerr if(false) cerr
#endif
#define dbg(x) cerr << #x << " : " << x << endl;
#define dbgs(x,y) cerr << #x << " : " << x << " / " << #y << " : " << y << endl;
#define dbgv(v) cerr << #v << " : " << "[ "; for(auto it : v) cerr << it << ' '; cerr << ']' << endl;
#define here() cerr << "here" << endl;

void IO() {
#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
}
/////////////////////////ONLY CLEAN CODES ALLOWED/////////////////////////

int32_t main() {
    boost; IO();

    int N; cin>>N;
    vector<pair<int,str>>vec(N);
    FOR(i,0,N){
    	cin>>vec[i].se>>vec[i].fi;
    }
    sort(rall(vec));
    cout << vec[1].se << endl;

    return 0;
}
//Change your approach

#include<bits/stdc++.h>
typedef long long ll;
#define V(a) vector
#define P(a,b) pair
#define A(a) set
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define in insert
#define bp __builtin_popcount
#define ppb pop_back
#define FOR(a,b,c) for(ll(a) = b; a < c; a++)
#define FORN(a,b,c) for(ll(a) = b; a <= c; a++)
#define FOREV(a,b,c) for(ll(a)=b; a > c; a--)
#define FOREVN(a,b,c) for(ll(a)=b; a >= c; a--)
#define fastio ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
using namespace std;

bool cprime(int x)
{
    if (x == 1)
        return false;
    if (x <= 3)
        return true;
    if (x % 2 == 0 || x % 3 == 0)
        return false;
    for (int i = 5; i <= sqrt(x); i += 6)
        if (x % i == 0 || x % (i + 2) == 0)
            return false;
    return true;
}

bool cpalin(string s)
{
    int n = s.length(), l;
    if (n == 1)
        return true;
    if (n % 2 == 0)
        l = n / 2 - 1;
    else
        l = (n - 1) / 2 - 1;
    for (int i = 0; i <= l; i++)
        if (s[i] != s[n - i - 1])
            return false;
    return true;
}
void sieveOfEratosthenes(int n)
{
    bool arr[n + 1];
    FOR(i, 0, n + 1)
    arr[i] = true;
    for (int i = 2; i * i <= n; i++)
    {
        if (arr[i] == true)
        {
            for (int j = i * i ; j <= n; j += i)
            {
                if (arr[j] == true)
                    arr[j] = false;
            }
        }
    }
}

ll ndivs(ll n)
{
    int N = 1000;
    bool arr[N];
    FOR(i, 0, N)
    arr[i] = true;
    for (int i = 2; i * i <= N; i++)
    {
        if (arr[i] == true)
        {
            for (int j = i * i ; j <= N; j += i)
            {
                if (arr[j] == true)
                    arr[j] = false;
            }
        }
    }

    ll p = 1;
    FOR(i, 2, N)
    {
        if (arr[i] == true && n % i == 0)
        {
            ll m = 0; ll cp = n;
            while (cp % i == 0)
            {
                cp /= i;
                m++;
            }
            p *= (m + 1);
        }
    }
    return p;
}
bool compare( ll a,  ll b) // false return swap
{
    return a > b;
}

ll power( ll a, ll b)
{
    ll p = 1;
    while (b > 0)
    {
        if (b & 1)
            p *= a;
        a *= a;
        b >>= 1;
    }
    return p;
}

string dtobin(ll n)
{
    string s;
    while (n)
    {
        s = to_string((n % 2)) + s;
        n /= 2;
    }
    return s;
}

ll bintod(string s)
{
    ll n = 0;
    FOR(i, 0, s.length())
    if (s[i] == '0')
        continue;
    else
        n += pow(2, (s.length() - 1 - i));
    return n;
}

ll sdigs(ll n)
{
    int s = 0;
    while (n)
    {
        s += n % 10;
        n /= 10;
    }
    return s;
}

ll fact(ll p)
{
    int x = 1;
    FORN(i, 1, p)
    x *= i;

    return x;
}
ll ncr(ll n , ll r)
{
    ll ans = (fact(n) ) / (fact(r) * fact(n - r));
    return ans;
}

int main() {

#ifndef ONLINE_JUDGE
    freopen("Input.txt", "r", stdin);
    freopen("Output.txt", "w", stdout);
#endif

    int n;
    cin >> n;
    V(P(int, string)) v;
    FOR(i, 0, n)
    {
        int x;
        string s;
        cin >> s >> x;
        v.pb(mp(x, s));
    }

    sort(v.begin(), v.end());
    cout << v[n - 2].S;
    return 0;
}


#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=(a); i<(b); i++)
using namespace std;
using ll = long long;
using vi = vector<int>;
using vv = vector<vi>;
const int INF = 1001001001;

int main(){
    int n; cin >> n;
    vi a(n), b(n);
    int bmin = INF;
    rep(i,0,n){
        cin >> b[i];
        bmin = min(bmin, b[i]);
    }
    a[0] = b[0];
    rep(j,1,n){
        cin >> a[j];
        rep(i,1,n){
            int c; cin >> c;
            if(b[0]+c != a[j] + b[i]){
                cout << "No" << endl;
                return 0;
            }
        }
    }
    cout << "Yes" << endl;
    rep(i,0,n)cout<<a[i]-(b[0]-bmin)<<(i==n-1?'\n':' ');
    rep(i,0,n)cout<<b[i]-bmin<<(i==n-1?'\n':' ');
    return 0;
}

#pragma GCC optimize("Ofast")
#pragma GCC optimization ("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define pb push_back
const long double Pi = 3.141592653;
const ll mod=1e9+7;
long long INF = 1000000000000000000;
bool cmp(pair<int,int>a,pair<int,int>b)
{
    return (a.first<b.first) || (a.first==b.first && a.second>b.second);
}
int main()
{
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    int t=1;//cin>>t;
    while(t--)
    {
        int n;cin>>n;
        ll a[n][n],sum=0,sum1=0;
        for(int i=0;i<n;i++)
        {
            for(int j=0;j<n;j++)
            {
                cin>>a[i][j];
                sum+=a[i][j];
                if(i==j)
                sum1+=a[i][j];
            }
        }
        if(sum%n)
        cout<<"No";
        else
        {
            ll h=sum/n;
            if(h!=sum1)
            cout<<"No";
            else
            {
                ll pref[n]={0},mi=1e18;
                for(int i=0;i<n;i++)
                {
                    for(int j=0;j<n;j++)
                    {
                        pref[i]+=a[i][j];
                    }
                    mi=min(mi,pref[i]);
                }
                bool ok=true;sum=0;
                vector <int>a1(n),b(n);
                for(int i=0;i<n;i++)
                {
                    ll g=pref[i]-mi;
                    if(g%n || g<0)
                    ok=false;
                    else
                    {
                        a1[i]=g/n;
                        sum+=a1[i];
                    }
                }
                ll suff[n]={0};
                for(int i=0;i<n;i++)
                {
                    for(int j=0;j<n;j++)
                    {
                        suff[i]+=a[j][i];
                    }
                }
                for(int i=0;i<n;i++)
                {
                    ll g=suff[i]-sum;
                    if(g%n || g<0)
                    ok=false;
                    else
                    {
                        b[i]=g/n;
                    }
                }
                if(ok)
                {
                    cout<<"Yes"<<endl;
                    for(int i=0;i<n;i++)
                    cout<<a1[i]<<" ";
                    cout<<endl;
                    for(int i=0;i<n;i++)
                    cout<<b[i]<<" ";
                }
                else
                cout<<"No";
            }
        }
    }
}


// Atcoder.cpp : このファイルには 'main' 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//

#define _USE_MATH_DEFINES

#include<math.h>
#include<deque>
#include<queue>
#include<vector>
#include<algorithm>
#include<iostream>
#include<set>
#include<cmath>
#include<tuple>
#include<string>
#include<chrono>
#include<functional>
#include<iterator>
#include<random>
#include<unordered_set>
#include<array>
#include<map>
#include<iomanip>
#include<assert.h>
#include<bitset>
#include<stack>
#include<memory>
#include <sstream>

using namespace std;
typedef long long ll;
#define rad_to_deg(rad) (((rad)/2/M_PI)*360)
#define EPS (1e-7)
//#define INF (1e9)
#define PI (acos(-1))
#define rep(i,n) for(int i=0;i<n;i++)
#define show(s) cout<<s<<endl
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
//#define LINF (1e18)
#define MOD (1e9+7)
#define rrep(i,n) for(int i=n-1;i>=0;--i)
#define reps(i,N)for(int i =1;i<=N;++i)
#define all(x) (x).begin(),(x).end()
//#define int long long
const int INF = 1e9;
const ll LINF = 1e18;
//typedef pair < ll, ll> P;

//元がintの分けたものを返す p[0]は1桁目
vector<int> divnum(ll num) {
	int dig;
	vector<int>p;
	while (num) {
		dig = num % 10;
		p.push_back(dig);
		num /= 10;
	}
	return p;
}
//桁数を返す
int digiter(ll num) {
	int dig;
	vector<int>p;
	while (num) {
		dig = num % 10;
		p.push_back(dig);
		num /= 10;
	}
	return p.size();
}
//元がstringの分けたものを返す d[0]は一桁目
vector<int> convertstring(string s) {
	vector<int> d;
	ll n = s.size();
	reverse(s.begin(), s.end());
	rep(i, n) {
		d.push_back(s[i] - '0');
	}
	return d;
}

/*long double　は%Lf*/
//queue古い順,stack新しい
//bool operator<(const Info &another) const {return x > another.x;}//struct(構造体)内の比較演算子のオバーロード
int N,K;
int A[805][805];
ll Dcnt[805][805];
void CSum2D(int H,int W) {
	rep(i, H)rep(j, W) {
		if (i > 0)Dcnt[i][j] += Dcnt[i - 1][j];
		if (j > 0)Dcnt[i][j] += Dcnt[i][j - 1];
		if (i > 0 && j > 0)Dcnt[i][j] -= Dcnt[i - 1][j - 1];
	}
}
int32_t main() {
	cin >> N >> K;
	rep(i, N)rep(j, N)cin >> A[i][j];
	int ul = INF, bl = -1;
	while (ul - bl > 1) {
		int mid = (ul + bl) >> 1;
		rep(i, N) {
			rep(j, N) {
				if (A[i][j] <= mid)Dcnt[i][j] = 1;
				else Dcnt[i][j] = 0;
			}
		}
		CSum2D(N, N);
		int thres = K*K-K * K / 2;
		rep(i, N)rep(j, N) {
			if (i + K - 1 >= N || j + K - 1 >= N)continue;
			ll sum = Dcnt[i + K - 1][j + K - 1];
			if (i > 0)sum -= Dcnt[i - 1][j+K-1];
			if (j > 0)sum -= Dcnt[i+K-1][j - 1];
			if (i > 0 && j > 0)sum += Dcnt[i - 1][j - 1];
			if (sum >= thres) {
				ul = mid;
				break;

			}
		}
		if(ul!=mid)bl = mid;

	}
	cout << ul << endl;

}

/*
    Author: Nguyen Tan Bao
    Status:
    Idea:
*/

#include <bits/stdc++.h>
#define FI first
#define SE second
#define EPS 1e-9
#define ALL(a) a.begin(),a.end()
#define SZ(a) int((a).size())
#define MS(s, n) memset(s, n, sizeof(s))
#define FOR(i,a,b) for (int i = (a); i <= (b); i++)
#define FORE(i,a,b) for (int i = (a); i >= (b); i--)
#define FORALL(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); it++)
//__builtin_ffs(x) return 1 + index of least significant 1-bit of x
//__builtin_clz(x) return number of leading zeros of x
//__builtin_ctz(x) return number of trailing zeros of x

using namespace std;
using ll = long long;
using ld = double;
typedef pair<int, int> II;
typedef pair<II, int> III;
typedef complex<ld> cd;
typedef vector<cd> vcd;

const ll MODBASE = 1000000007LL;
const int MAXN = 110;
const int MAXM = 1000;
const int MAXK = 16;
const int MAXQ = 200010;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(nullptr);
    char ch, ch2;
    cin >> ch >> ch2;
    if (ch == 'Y') cout << char(ch2 - 32);
    else cout << ch2;
    return 0;
}


#include <iostream>
#include <cstdio>
using namespace std;
const int N = 1e5 + 100;
int n, m;
int cnt[2];
char s[30];
int main() {
    scanf("%d%d", &n, &m);
    for (int i = 1; i <= n; i++) {
        scanf("%s", s + 1);
        int tmp = 0;
        for (int j = 1; j <= m; j++) {
            if (s[j] == '1') tmp++;
        }
        tmp &= 1;
        cnt[tmp]++;
    }
    cout << cnt[0] * 1ll * cnt[1] << endl;
}

#include <bits/stdc++.h>

using namespace std;

#define eps 1e-9
#define INF 2000000000              // 2e9
#define LLINF 2000000000000000000ll // 2e18 (llmax:9e18)
#define all(x) (x).begin(), (x).end()
#define sq(x) ((x) * (x))

#define rep(i, x) for (int i = 0; i < (int)(x); i++)
#define drep(i, x) for (int i = ((int)(x)-1); i >= 0; i--)

#define popcount __builtin_popcount
#define next __next
#define prev __prev

#ifndef LOCAL
#define dmp(...) ;
#else
#define dmp(...)                                                               \
  cerr << "[ " << #__VA_ARGS__ << " ] : " << dump_str(__VA_ARGS__) << endl
#endif

// ---------------- Utility ------------------

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

template <class T>
using MaxHeap = priority_queue<T>;
template <class T>
using MinHeap = priority_queue<T, vector<T>, greater<T>>;

template <class T>
vector<T> vect(int len, T elem) {
  return vector<T>(len, elem);
}

// ----------------- Input -------------------

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

template <class T>
istream &operator>>(istream &is, vector<T> &vec) {
  for (int i = 0; i < vec.size(); i++) is >> vec[i];
  return is;
}

// ----------------- Output ------------------

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

template <class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  for (const T &e : v) os << e << " ";
  return os;
}

template <class T>
ostream &operator<<(ostream &os, const deque<T> &d) {
  for (const T &e : d) os << e << " ";
  return os;
}

template <class T>
ostream &operator<<(ostream &os, const set<T> &s) {
  os << "{ ";
  for (const T &e : s) os << e << " ";
  return os << "}";
}

template <class T, class U>
ostream &operator<<(ostream &os, const map<T, U> &m) {
  os << "{ ";
  for (const auto &[key, val] : m) os << "( " << key << " -> " << val << " ) ";
  return os << "}";
}

template <class TupleTy, size_t... I>
void dump_tuple(ostream &os, const TupleTy t, std::index_sequence<I...>) {
  (..., (os << (I == 0 ? "" : ",") << std::get<I>(t)));
}

template <class... Args>
ostream &operator<<(ostream &os, const tuple<Args...> &t) {
  os << "(";
  dump_tuple(os, t, std::make_index_sequence<sizeof...(Args)>());
  return os << ")";
}

void dump_str_rec(ostringstream &) {}

template <class Head, class... Tail>
void dump_str_rec(ostringstream &oss, Head &&head, Tail &&... tail) {
  oss << ", " << head;
  dump_str_rec(oss, forward<Tail>(tail)...);
}

template <class T, class... U>
string dump_str(T &&arg, U &&... args) {
  ostringstream oss;
  oss << arg;
  dump_str_rec(oss, forward<U>(args)...);
  return oss.str();
}

// --------------- Fast I/O ------------------

void fastio() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  cout << fixed << setprecision(20);
}

// ------------ End of template --------------

#define endl "\n"
using ll = long long;
using pii = pair<int, int>;

void solve() {
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '.') break;
    cout << s[i];
  }
  cout << endl;
  return;
}

int main() {
  fastio();
  solve();
  // int t; cin >> t; while(t--)solve();

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


#include <bits/stdc++.h>

#define pb push_back
#define eb emplace_back
#define all(v) (v).begin(), (v).end()

typedef int64_t ll;
typedef uint64_t ull;

using namespace std;

void one_case() {
    int n, k;
    cin >> n >> k;
    vector<int> a(n);
    for (auto& el : a) cin >> el;

    sort(all(a));
    vector<int> bx(k);

    int prev = -1;
    int pos = 0;

    for (auto el : a) {
        if (el != prev) {
            pos = 0;
        }
        prev = el;
        if (pos == k) {
            continue;
        }
        if (pos == 0 && el > bx[pos]) {
            break;
        }
        if (el == bx[pos]) {
            ++bx[pos++];

        }

    }

    cout << accumulate(all(bx), 0ll);

}

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

    int t = 1;
//    cin >> t;
    for (int i = 0; i < t; ++i) {
        one_case();
    }

    return 0;
}

 /*
    Stay motivated and keep working hard
*/
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define int long long
#define pb push_back
#define cntbit __builtin_popcount
#define fr first
#define mem(arr, val) memset(arr, val, sizeof(arr))
#define sc second
#define sz(v) ((int)(v).size())
#define mp make_pair
#define all(a) a.begin(),a.end()
#define rep(i,a,n) for(int i=a;i<n;i++)
#define repd(i,a,p) for(int i=a-1;i>=p;i--)
#define md 998244353
#define vi vector<int>
#define vp vector<pair<int,int> >
#define ml map<int,int>
#define MPI 3.1415926536
#define in insert
#define endl "\n"
#define ub  upper_bound
#define lb  lower_bound
#define gcd __gcd
#define setval(a,b) memset(a,b,sizeof(a))
#define lwr lower_bound
#define pii pair<int,int>
#define upr upper_bound
#define ordered_set     tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
//CANDIDATE MASTER TOH BNKE RHUNGA
//dsu is pel concept
//KMP is pel concept
int k,n,t,i,j=0,m;
const int N=1e6+5;
int md2;
inline void add(int &a, int b) {
  a += b;
  if (a >= md) a -= md;
}

inline void sub(int &a, int b) {
  a -= b;
  if (a < 0) a += md;
}

inline int mul(int a, int b) {
  return (int) ((long long) a * b % md);
}

inline int power(int a, long long b) {
  int res = 1;
  while (b > 0) {
    if (b & 1) {
      res = mul(res, a);
    }
    a = mul(a, a);
    b >>= 1;
  }
  return res;
}

inline int inv(int a) {
  a %= md;
  if (a < 0) a += md;
  int b = md, u = 0, v = 1;
  while (a) {
    int t = b / a;
    b -= t * a; swap(a, b);
    u -= t * v; swap(u, v);
  }
  if (u < 0) u += md;
  return u;
}
void extgcd(int a,int b, int& x,int& y)
{
    if(b != 0){
        extgcd(b, a % b, y, x);
        y -= (a / b) * x;
    }else{
        x = 1;
        y = 0;
    }
}
signed main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    cin>>n>>k;
    vi v(n);
    multiset <int> st;
	for(int i=0;i<n;i++)
    {
    	cin>>v[i];
    	st.insert(v[i]);
	}
	int ans=0;
	while(k)
	{
		for(i=0;i<=n;i++)
		{
			auto it=st.find(i);
			if(it==st.end())
			break;
			st.erase(it);
		}
		ans+=i;
		k--;
	}
	cout<<ans<<endl;
}


#include <iostream>
#include <cmath>
int main(void){
    int N,K,M,l,i;
  	double SUM = 0.0;
    double j,k;
  	int *A;

	std::cin >> N >> K >> M;

  	A = new int[N-2];
  	i = 0;
  	while(std::cin>>l){
        A[i] = l;
        i++;
        SUM = SUM + l;
    }

  	j = M * N - SUM;

  	if (j < 0){
    	j = 0;
    }

  	if(j > K){
    	j = -1;
    }

    std::cout << std::ceil(j);

	return 0;
}

#include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<math.h>
using namespace std;

int main() {
	long double a, b, r, u, l;
	unsigned long long c = 0;
	long n, m;

	cin >> a >> b >> r;
    r += 1E-14;
	n = ceil((a - r));
	m = floor(a + r);
	for (long i = n; i <= m ; i++) {
		u = sqrt((r * r) - (i - a)*(i - a));
		u = floor(b + u);
		l = sqrt((r * r) - (i - a) * (i - a));
		l = ceil(b - l);
		c += u - l + 1;
	}
	cout << c;
	return 0;
}


#include <bits/stdc++.h>
#define int long long
#define double long double
using namespace std;
const int MOD = 1000000007;
const int INF = 1000000000000000000;
using Graph = vector<vector<int>>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

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

  for( int i = 0; i < 15; i++ ){
    int N = S.size();
    bool fg = 1;
    for( int i = 0; i < N/2; i++ ){
      if( S[i] != S[N-1-i] ){
        fg = 0;
        break;
      }
    }
    if( fg ){
      cout << "Yes" << endl;
      return 0;
    }
    S = "0" + S;
  }
  cout << "No" << endl;
}

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

using Int = long long;
const char newl = '\n';

template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}
template<typename T> void drop(const T &x){cout<<x<<endl;exit(0);}
template<typename T=int>
vector<T> read(size_t n){
  vector<T> ts(n);
  for(size_t i=0;i<n;i++) cin>>ts[i];
  return ts;
}

struct UnionFind{
  int num;
  vector<int> rs,ps;
  UnionFind(int n):num(n),rs(n,1),ps(n,0){
    iota(ps.begin(),ps.end(),0);
  }
  int find(int x){
    return (x==ps[x]?x:ps[x]=find(ps[x]));
  }
  bool same(int x,int y){
    return find(x)==find(y);
  }
  void unite(int x,int y){
    x=find(x);y=find(y);
    if(x==y) return;
    if(rs[x]<rs[y]) swap(x,y);
    rs[x]+=rs[y];
    ps[y]=x;
    num--;
  }
  int size(int x){
    return rs[find(x)];
  }
  int count() const{
    return num;
  }
};

template<typename T, T MOD = 1000000007>
struct Mint{
  static constexpr T mod = MOD;
  T v;
  Mint():v(0){}
  Mint(signed v):v(v){}
  Mint(long long t){v=t%MOD;if(v<0) v+=MOD;}

  Mint pow(long long k){
    Mint res(1),tmp(v);
    while(k){
      if(k&1) res*=tmp;
      tmp*=tmp;
      k>>=1;
    }
    return res;
  }

  static Mint add_identity(){return Mint(0);}
  static Mint mul_identity(){return Mint(1);}

  Mint inv(){return pow(MOD-2);}

  Mint& operator+=(Mint a){v+=a.v;if(v>=MOD)v-=MOD;return *this;}
  Mint& operator-=(Mint a){v+=MOD-a.v;if(v>=MOD)v-=MOD;return *this;}
  Mint& operator*=(Mint a){v=1LL*v*a.v%MOD;return *this;}
  Mint& operator/=(Mint a){return (*this)*=a.inv();}

  Mint operator+(Mint a) const{return Mint(v)+=a;}
  Mint operator-(Mint a) const{return Mint(v)-=a;}
  Mint operator*(Mint a) const{return Mint(v)*=a;}
  Mint operator/(Mint a) const{return Mint(v)/=a;}

  Mint operator-() const{return v?Mint(MOD-v):Mint(v);}

  bool operator==(const Mint a)const{return v==a.v;}
  bool operator!=(const Mint a)const{return v!=a.v;}
  bool operator <(const Mint a)const{return v <a.v;}

  static Mint comb(long long n,int k){
    Mint num(1),dom(1);
    for(int i=0;i<k;i++){
      num*=Mint(n-i);
      dom*=Mint(i+1);
    }
    return num/dom;
  }
};
template<typename T, T MOD> constexpr T Mint<T, MOD>::mod;
template<typename T, T MOD>
ostream& operator<<(ostream &os,Mint<T, MOD> m){os<<m.v;return os;}

//INSERT ABOVE HERE
signed main(){
  cin.tie(0);
  ios::sync_with_stdio(0);

  int n;
  cin>>n;
  auto fs=read(n);
  UnionFind uf(n);
  for(int i=0;i<n;i++){
    fs[i]--;
    uf.unite(i,fs[i]);
  }
  using M = Mint<int, 998244353>;
  cout<<M(2).pow(uf.count())-M(1)<<newl;
  return 0;
}


#include <iostream>
#include <deque>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <memory>
#include <limits>
#include <queue>
#include <algorithm>
using namespace std;

using ull = unsigned long long;
using ui = unsigned int;

int res;
void bs(const vector<int>& nums, int idx, int prexor) {
    int size = nums.size();
    if(idx == size) {
        // todo
        res = min(res, prexor);
        return;
    }
    int now_or = 0;
    for(int i = idx; i < size; i++) {
        now_or |= nums[i];
        bs(nums, i + 1, prexor ^ now_or);
    }
}

void func() {
    int N;
    cin >> N;
    vector<int> nums;
    for(int i = 0; i < N; i++) {
        int v;
        cin >> v;
        nums.push_back(v);
    }
    res = INT32_MAX;
    bs(nums, 0, 0);
    cout << res << endl;
}

int main() {
    func();
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long  ll;
typedef vector<vector<vector<long double> > > vvvld;
typedef vector<vector<long double> > vvld;
typedef vector<vector<vector<int> > > vvvi;
typedef vector<vector<int> > vvi;
typedef long double ld;

#define rep(i,n) for (int  i = 0; i< (int)(n); i++)
int main(){
  int n;
  cin>>n;
  vector<ll> a(n);
  vector<bitset<30>> bi;
  for(int i =0; i<n; i++){
    cin>>a.at(i);
    bitset<30> bb(a.at(i));
    bi.push_back(bb);
  }
  ll lans =1e18;
  for(int i =0; i<(1<<n-1); i++){
    bitset<20> b(i);
    queue<bitset<30>> q;
  vector<bitset<30>> bt = bi;
    for(int j =0; j<n-1; j++){
      if(b.test(j)){
	q.push(bt.at(j));
      }
      else{
	bt.at(j+1) = bt.at(j+1)|bt.at(j);
      }
    }
    q.push(bt.at(n-1));
    bitset<30> ans;
    ans = q.front();q.pop();
    while(!q.empty()){
      bitset<30> tmp = q.front();q.pop();
      ans = ans^tmp;
    }
    ll ltmp = 0;
    ll two = 1;
    for(int i =0; i<30; i++){
      if(ans.test(i)) ltmp += two;
      two*=2;
    }
    lans = min(ltmp,lans);
  }
  cout<<lans<<endl;
}


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

int main() {
    double x, y, z;
    scanf("%lf%lf%lf", &x, &y, &z);
    printf("%d", (int)max(0.0,ceil(z*(y/x))-1));
}

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
#define inf ll(1e18)
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	int T;
	T=1;
	while(T--){
		int x,y,z;
		cin>>x>>y>>z;
		int answer=0;
		for(int i=1; i<=1000000; i++){
			int var=x*i;
			int temp=y*z;
			if(var<temp){
				answer=max(answer,i);
			}
		}
		cout<<answer;
	}
	return 0;
}


                                //ABHISHEK AGRAWAL,BIT mesra//
                        //Newbie......You have to be odd to be no. ONE :)//
  //Authhor: Abhishekagrawal
  //Date: 20/02/2021
  //Time: 17:30:13
  #include<bits/stdc++.h>
  using namespace std;
  #define ll long long int
  #define ld long double
  #define fl float
  #define vll vector<ll>
  #define pii pair<int,int>
  #define vpll vector<pair<ll,ll>>
  #define pb push_back
  #define f first
  #define s second
  #define mll map<ll,ll>
  #define mp make_pair
  #define sp(n) fixed<<setprecision(n)
  #define mod (ll)1000000007
  #define sortv(v) sort(v.begin(),v.end())
  #define INF (ll)(1e15)
  #define loop(i,n) for(int i=0;i<n;i++)
  #define loop1(i,n) for(int i=1;i<=n;i++)
  #define rloop(n,i) for(int i=n-1;i>=0;i--)
  #define sorta(a) sort(a,a+n,greater<ll>())
  #define countone(n) __builtin_popcount(n)
  #define numoftrailzero(n) __builtin_ctz(n)
  #define maxpowoftwo(n) __builtin_clz(n)
  #define leastindexwithone(n)  __builtin_ffs(n)
  #define what_is(x) cerr << #x << " is " << x << endl;
  #define pfv(v) cout<<v.size()<<"\n";loop(i,v.size()) cout<<v[i]<<" ";cout<<"\n";
  #define pv(v) loop(i,v.size()) cout<<v[i]<<" ";
  #define all(v) v.begin(),v.end()
  #define mset(dp,val) memset(dp,val,sizeof(dp))
  ll test,n;ll sum,ans;
  // #ifdef TESTING
  // #define DEBUG fprintf(stderr, "====TESTING====\n")
  // #define VALUE(x) cerr << "The value of " << #x << " is " << x << endl
  // #define debug(...) fprintf(stderr, __VA_ARGS__)
  // #else
  // #define DEBUG
  // #define VALUE(x)
  // #define debug(...)
  // #endif
  void the_happiest_place_on_earth()
  {
      ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    #ifdef ENABLE_FILE_IO
      freopen("out.txt", "r", stdin);
      freopen("out1.txt", "w", stdout);
    #endif
  }
  // bool comp(const pair<ll,ll> &a, const pair<ll,ll> &b){
  //   if(a.s+2*a.f==b.s+2*b.f) return a.f>b.f;
  //   return (a.s+2*a.f>b.s+2*b.f);
  // }

  const int N=200040;ll a[N],b[N],c[N],par[N],Size[N],present[N],color[N];
  ll power(ll a,ll b,ll M){a%=M;ll res=1;while(b>0){if(b%2 ==1){res=(res*a)%M;}a=(a*a)%M;b/=2;} return res;}
  void testcase(){
    ll m;
    cin>>n>>m;ll k;cin>>k;
    ll mo=998244353;
    if(n==1){
      cout<<power(k,m,mo);
      return;
    }
    if(m==1){
      cout<<power(k,n,998244353);
      return;
    }
    ans=0;
    loop1(i,k){
      ll n1=power(i,n,mo);
      ll n2=power(i-1,n,mo);
      n1=((n1-n2)%mo+mo)%mo;
      n2=power(k-i+1,m,mo);
      n1=(n1*n2)%mo;
      (ans+=n1)%=mo;
    }
    cout<<ans<<"\n";
    return;
  }

  int main(){
    the_happiest_place_on_earth();
    // Today's thought: Push yourself,because no one else is going to do it for you.
    // Things are not always #000000 and #FFFFFF
    // START OF PROGRAM LOGIC
    // g++ -o a BB.cpp -DENABLE_FILE_IO;./a
    // g++ -std=c++17 -Wshadow -Wall -g -fsanitize=address -fsanitize=undefined -D_GLIBCXX_DEBUG -o a file_name.cpp;./a
    test=1;int t=0;
    // cin>>test;
    while(test--){
      //cout<<"Case #"<<++t<<": ";
      testcase();
    }
    cerr << "Time : " << 1000 *((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";
    // //END OF PROGRAM LOGIC
    return 0;
  }
  /* stuff you should look for
      * int overflow, array bounds
      * special cases (n=1?)
      * do smth instead of nothing and stay organized
      * WRITE STUFF DOWN
      * DON'T GET STUCK ON ONE APPROACH
  */

#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <complex>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;

typedef long long ll;

const ll MOD = 998244353;

ll mod_pow(ll x, ll n) {
  ll res = 1;
  while (n > 0) {
    if (n & 1) res = res * x % MOD;
    x = x * x % MOD;
    n >>= 1;
  }
  return res;
}

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

  cin >> n >> m >> k;

  if (n == 1 && m == 1) {
    cout << k << endl;
    return 0;
  }

  if (n == 1) {
    swap(n, m);
  }

  ll sumP = 0;
  ll ans = 0;
  for (int limit = 1; limit <= k; limit++) {
    ll p = (mod_pow(limit, n) - sumP + MOD) % MOD;
    sumP += p;
    sumP %= MOD;

    if (m == 1) {
      ans += p;
      ans %= MOD;
    } else {
      ans += p * mod_pow(k - limit + 1, m);
      ans %= MOD;
    }
  }
  cout << ans << endl;
}


#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define rrep(i, a, b) for (int i = a; i >= (b); --i)
#define all(x) x.begin(), x.end()
#define sz(x) (int)(x).size()
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
template <typename T>
void update_max(T& a, T b) {
    if (b > a) a = b;
}
template <typename T>
void update_min(T& a, T b) {
    if (b < a) a = b;
}
struct Tree {
    typedef int T;
    static constexpr T unit = 0;
    T f(T a, T b) { return a ^ b; }  // (any associative fn )
    vector<T> s;
    int n;
    Tree(int n = 0, T def = unit) : s(2 * n, def), n(n) {}
    void update(int pos, T val) {
        for (s[pos += n] = val; pos /= 2;)
            s[pos] = f(s[pos * 2], s[pos * 2 + 1]);
    }
    T query(int b, int e) {  // query [ b , e)
        T ra = unit, rb = unit;
        for (b += n, e += n; b < e; b /= 2, e /= 2) {
            if (b % 2) ra = f(ra, s[b++]);
            if (e % 2) rb = f(s[--e], rb);
        }
        return f(ra, rb);
    }
};
int main() {
#ifdef LOCAL_PROJECT
    freopen("input.txt", "r", stdin);
#endif
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n, q, a;
    cin >> n >> q;
    Tree tree(n);
    rep(i, 0, n) {
        cin >> a;
        tree.update(i, a);
    }
    int t, x, y;
    rep(i, 0, q) {
        cin >> t >> x >> y;
        if (t == 1) {
            tree.update(x - 1, tree.s[x - 1 + tree.n] ^ y);
        } else {
            cout << tree.query(x - 1, y) << endl;
        }
    }
    return 0;
}

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

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

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

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

template<class T>
class FenwickTree {
private:
    int n;
    vector<T> bit;
public:
    explicit FenwickTree(int sz, T &&x = T(0)) : n(sz), bit(n + 1) {
        for (int i = 0; i < n; i++) add(i, x);
    }

    T sum(int k) const {
        T res = 0;
        for (k--; k >= 0; k = (k & (k + 1)) - 1) res ^= bit[k];
        return res;
    }
    T sum(int l, int r) const { return sum(r) ^ sum(l); }

    void add(int k, const T &x) {
        for (; k < n; k |= k + 1) bit[k] ^= x;
    }
    void set(int k, const T &x) { add(k, x - sum(k, k + 1)); }
};

int main() {

    int N, Q;
    cin >> N >> Q;

    vector<int> A(N);
    for (int i = 0; i < N; i++) cin >> A[i];

    vector<array<int, 3>> TXY(Q);
    for (int i = 0; i < Q; i++) cin >> TXY[i][0] >> TXY[i][1] >> TXY[i][2];

    FenwickTree<int> ft(N);
    for (int i = 0; i < N; i++) {
        ft.set(i, A[i]);
    }
    for (int i = 0; i < Q; i++) {
        auto[t, x, y] = TXY[i];
        t--, x--;
        if (t) {
            cout << ft.sum(x, y) << '\n';
        }
        else {
            ft.add(x, y);
        }
    }

    return 0;
}


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

#define FOR(i, a, b) for (int i = a; i < b; ++i)
#define REP(i, n) for (int i = 0; i < n; ++i)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;

int main() {
  int n;
  cin >> n;
  vector<int> cnt(2000001, 0);
  int pi;
  int x = 0;
  REP(i, n) {
    cin >> pi;
    cnt[pi]++;
    while (cnt[x] > 0) {
      x++;
    }
    cout << x << endl;
  }
}

#include <bits/stdc++.h>

using namespace std;
typedef long long ll;

void solve() {
    string t; cin >> t;
    int n = t.size();
    string s = "atcoder", p = t;
    sort(p.rbegin(), p.rend());
    if (p <= s) {
        cout << -1 << endl;
        return;
    }
    if (t > s) {
        cout << 0 << endl;
        return;
    }
    int m = n;
    for (int i = n - 1; i >= 0; i--) {
        for (int j = min(6, i - 1); j >= 0; j--) {
            swap(t[i], t[j]);
            if (s < t) {
                m = min(m, i - j);
            }
            swap(t[i], t[j]);
        }
    }
    cout << m << endl;
}

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


#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>
#include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define repi(i,a,b) for(ll i=(a);i<(b);++i)
#define rep(i,a) repi(i,0,a)
#define repdi(i,a,b) for(ll i=(a)-1;i>=(b);--i)
#define repd(i,a) repdi(i,a,0)
#define itr(it,a) for( auto it = (a).begin(); it != (a).end(); ++it )
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define endl '\n'
#define debug(x) std::cerr << #x << " = " << (x) << endl;

using ll = long long;
using P = std::pair<ll, ll>;

constexpr ll INF = 1ll<<60;

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

template<class S, class T>
std::ostream& operator<< ( std::ostream& out, const std::pair<S,T>& a )
{ std::cout << '(' << a.first << ", " << a.second << ')'; return out; }

template<class T>
std::ostream &operator<< ( std::ostream& out, const std::vector<T>& a )
{ std::cout << '['; rep( i, a.size() ){ std::cout << a[i]; if( i != a.size()-1 ) std::cout << ", "; } std::cout << ']'; return out; }

const ll mod = 998244353;
struct mint {
  ll x; // typedef long long ll;
  mint(ll x=0):x((x%mod+mod)%mod){}
  mint operator-() const { return mint(-x);}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this;}
  mint operator+(const mint a) const { return mint(*this) += a;}
  mint operator-(const mint a) const { return mint(*this) -= a;}
  mint operator*(const mint a) const { return mint(*this) *= a;}
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t>>1);
    a *= a;
    if (t&1) a *= *this;
    return a;
  }

  // for prime mod
  mint inv() const { return pow(mod-2);}
  mint& operator/=(const mint a) { return *this *= a.inv();}
  mint operator/(const mint a) const { return mint(*this) /= a;}
};
std::istream& operator>>(std::istream& is, mint& a) { return is >> a.x;}
std::ostream& operator<<(std::ostream& os, const mint& a) { return os << a.x;}

struct combination {
  std::vector<mint> fact, ifact;
  combination(int n):fact(n+1),ifact(n+1) {
    assert(n < mod);
    fact[0] = 1;
    for (int i = 1; i <= n; ++i) fact[i] = fact[i-1]*i;
    ifact[n] = fact[n].inv();
    for (int i = n; i >= 1; --i) ifact[i-1] = ifact[i]*i;
  }
  mint operator()(int n, int k) {
    if (k < 0 || k > n) return 0;
    return fact[n]*ifact[k]*ifact[n-k];
  }
};

ll N, M;
mint mp[5010];

int main() {
  std::cin >> N >> M;

  mp[0] = 1;
  rep( i, N )
    mp[i+1] = mp[i]*M;

  mint ans = mint(N)*mint(M).pow(N);

  repi( x, 1, M+1 ) {
    mint dp = 1;

    repi( w, 1, N ) {
      ans -= dp*mp[N-(w+1)]*(N-w);

      dp *= M-x;
    }
  }

  std::cout << ans << endl;

  return 0;
}

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

// common mod numbers
const int MOD1=1000000007;
const int MOD2 = 998244353;

// loop definitions
#define for0(i, n) for (int i = 0; i < (int)(n); ++i) // 0 based indexing
#define for1(i, n) for (int i = 1; i <= (int)(n); ++i) // 1 based indexing
#define forc(i, l, r) for (int i = (int)(l); i <= (int)(r); ++i) // closed interver from l to r r inclusive
#define forr0(i, n) for (int i = (int)(n) - 1; i >= 0; --i) // reverse 0 based.
#define forr1(i, n) for (int i = (int)(n); i >= 1; --i) // reverse 1 based

//short hand for usual tokens
#define pb push_back
#define fi first
#define se second

//shorthand for commonly used types
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef double ld;

//PRE-DEFINED FUNCIONS

// modular inverse
int modInverse(int a, int m)
{
	for (int x = 1;x<m;x++)
		if (((a%m) * (x%m)) % m == 1)
			return x;
	return -1;

}

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

}
//USER-DEFINED FUNCTIONS

int main() {

	ios::sync_with_stdio(0);
	cin.tie(0);

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

    //fixing precision
    cout.precision(10);
    cout << fixed;

    //start here
    int a,b,c;
    cin>>a>>b>>c;
    cout<<a+b+c - min(min(a,b), c)<<endl;

    return 0;

}


#include <iostream>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <set>
#include <queue>
#include <map>

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

/*bool compare_function(const pair<int, int> a, const pair<int, int> b)
{
    return a.first < b.first;
}*/
// use case
//sort(V.begin(), V.end(), compare_function);

/*struct compare
{
    bool operator ()(const pair<int, int> &a, const pair<int, int> &b) {
    if (a.second-a.first==b.second-b.first)
    {
        return a.first>b.first;
    }
    return a.second-a.first < b.second-b.first;}
};
priority_queue <pair<int,int>, vector <pair<int,int>>, compare> Q;*/

void print(set <ll> X)
{
    for (ll i:X)
    {
        cout<<i<<" ";
    }
    cout<<endl;
    return;
}

ll solve(vector <ll> &A, ll t) {
	int k=(int)A.size();
	ll s=0;
	for (int i=0;i<k;i++) {s+=A[i];}
	if (s<=t) {return s;}
	set <ll> X;
    X.insert(0LL);
    for (int i=0;i<k/2;i++) {
		set <ll> Y;
		ll m=*X.rbegin();
		if (m==t) {return t;}
		for (ll x:X) {
			if (A[i]+x<=t) {
				Y.insert(A[i]+x);
				if (A[i]+x>m) {m=A[i]+x;}
				}
			}
		for (ll y:Y) {X.insert(y);}
 		}
 	set <ll> Z;
    Z.insert(0LL);
    for (int i=k/2;i<k;i++) {
		set <ll> Y;
		ll m=*X.rbegin();
		if (m==t) {return t;}
		for (ll x:Z) {
			if (A[i]+x<=t) {
				Y.insert(A[i]+x);
				if (A[i]+x>m) {m=A[i]+x;}
				}
			}
		for (ll y:Y) {Z.insert(y);}
 		}
 	ll ats=*X.rbegin();
 	ll z=*Z.rbegin();
 	//print(X);
 	//print(Z);
 	ats=max(ats,z);
 	for (ll x:X) {
		auto it=Z.upper_bound(t-x);
		if (it!=Z.begin()) {
			it--;z=*it; if (x+z<=t) {ats=max(ats,x+z);}
			}
		z=*it;
		while (it!=Z.end() && z+x<=t) {ats=max(ats,x+z);it++;if (it!=Z.end()) {z=*it;}}
		}
 	return ats;
	}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    int n;
    ll t;
    cin>>n>>t;
    vector <ll> A;
    for (int i=0;i<n;i++) {
		ll a;
		cin>>a;
		if (a<=t) {A.push_back(a);}}
	sort(A.begin(),A.end(),greater<ll>());
	ll ats=solve(A,t);
 	cout<<ats<<endl;
    return 0;
}

/**
 * author: said_v15
**/

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

using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> oset;

typedef long long  ll;

#define fast ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define forn for(int i=0;i<n;i++)
#define pb push_back
#define sc second
#define f first
#define kek cout<<"\n";
#define fla cout<<endl;
#define debug(x) cout << #x << " is " << x << '\n';
#define rep(i,a,b) for(int i=a;i<b;i++)
#define all(v) ((v).begin()), ((v).end())
#define int ll

const ll MOD = (ll) 1e9 + 7;
const ll MOD1 = 998244353;
const int MAXN = 1000010;
const int INF = 1e9;
const ll LL_INF=1e18;
const double pi=3.1415926535;

int divide(int a, int b)
{
          return (a+b-1)/b;
}

int32_t main()
{
    #if defined(_DEBUG)
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
    #endif
 fast;
 // cout << fixed << setprecision(12) << ans;
 // string al = "abcdefghijklmnopqrstuvwxyz";

 int questions=1;
 // cin>>questions;
 while(questions--)
 {
         int n,t;
         cin>>n>>t;
         vector<int> v(n);
         forn cin>>v[i];
         int to=n/2;
         int sz=n-to;
         vector<int> sum;
         for(int i=0;i<(1<<to);i++)
         {
                   int add=0;
                   for(int j=0;j<to;j++) if(i&(1<<j)) add+=v[j];
                   sum.push_back(add);
         }
         sort(all(sum));
         int ans=0;
         for(int i=0;i<(1<<sz);i++)
         {
                   int add=0;
                   for(int j=to;j<n;j++) if(i&(1<<(j-to))) add+=v[j];
                   int ost=t-add;
                   int near=upper_bound(all(sum),ost)-sum.begin();
                   near--;
                   if(near==-1) continue;
                   ans=max(ans, add+sum[near]);
         }
         cout<<ans;

 }

 // !!! LOOK AT NUMBER OF QUESTIONS IN A PROBLEM !!! (cin>>questions)

  // cout <<"Runtime is: "<<clock() * 1.0 / CLOCKS_PER_SEC <<endl;
   return 0;

}


#include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
#define int long long
#define mid (l+r>>1)
using namespace std;
int read(){
	int x = 1,a = 0;char ch = getchar();
	while (ch < '0'||ch > '9'){if (ch == '-') x = -1;ch = getchar();}
	while (ch >= '0'&&ch <= '9'){a = a*10+ch-'0';ch = getchar();}
	return x*a;
}
const int maxn = 505,mod = 998244353;
int n,m;
char s[maxn][maxn];
int dp[maxn][maxn][5],a[maxn][maxn];
signed main(){
	n = read(),m = read();
	for (int i = 1;i <= n;i++) scanf ("%s",s[i]+1);
	for (int i = 1;i <= n;i++) for (int j = 1;j <= m;j++){
		if (s[i][j] == 'R') a[i][j] = 0;
		else if (s[i][j] == 'B') a[i][j] = 1;
		else a[i][j] = 2;
	}
//	for (int i = 1;i <= n;i++){ for (int j = 1;j <= m;j++) cout<<a[i][j]<<" ";
//	cout<<endl;}
	for (int i = 1;i <= n;i++){
		for (int j = m;j >= 1;j--){
			dp[i][j][a[i][j]] = 1;
			if (i > 1&&j < m) dp[i][j][0] |= dp[i-1][j+1][0],dp[i][j][1] |= dp[i-1][j+1][1];
		}
	}
	int res = 0;
	for (int i = 1;i <= n;i++){
		if (!dp[i][1][0]&&!dp[i][1][1]) res++;
		if (dp[i][1][0]&&dp[i][1][1]){
			printf("0\n");
			return 0;
		}
	}
	for (int i = 2;i <= m;i++){
	//	cout<<dp[n][i][0]<<" "<<dp[n][i][1]<<endl;
		if (!dp[n][i][0]&&!dp[n][i][1]) res++;
		if (dp[n][i][1]&&dp[n][i][0]){
			printf("0\n");
			return 0;
		}
	}
	int ans = 1;
//	cout<<res<<endl;
	for (int i = 1;i <= res;i++) ans = 1ll*2*ans % mod;
	printf("%lld\n",ans);
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define eb emplace_back
#define x first
#define y second
#define FOR(i, m, n) for (ll i(m); i < n; i++)
#define DWN(i, m, n) for (ll i(m); i >= n; i--)
#define REP(i, n) FOR(i, 0, n)
#define DW(i, n) DWN(i, n, 0)
#define F(n) REP(i, n)
#define FF(n) REP(j, n)
#define D(n) DW(i, n)
#define DD(n) DW(j, n)
using ll = long long;
using ld = long double;
using pll = pair<ll, ll>;
using tll = tuple<ll, ll, ll>;
using vll = vector<ll>;
using vpll = vector<pll>;
using vtll = vector<tll>;
using gr = vector<vll>;
using wgr = vector<vpll>;
void add_edge(gr&g,ll x, ll y){ g[x].pb(y);g[y].pb(x); }
void add_edge(wgr&g,ll x, ll y, ll z){ g[x].eb(y,z);g[y].eb(x,z); }
template<typename T,typename U>
ostream& operator<<(ostream& os, const pair<T,U>& p) {
    cerr << ' ' <<  p.x << ',' << p.y; return os; }
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
    for(auto x: v) os << ' ' <<  x; return os; }
template <typename T>
ostream& operator<<(ostream& os, const set<T>& v) {
    for(auto x: v) os << ' ' <<  x; return os; }
template<typename T,typename U>
ostream& operator<<(ostream& os, const map<T,U>& v) {
    for(auto x: v) os << ' ' <<  x; return os; }
struct d_ {
    template<typename T> d_& operator,(const T& x) {
        cerr << ' ' <<  x; return *this;}
} d_t;
#define dbg(args ...) { d_t,"|",__LINE__,"|",":",args,"\n"; }
#define deb(X ...) dbg(#X, "=", X);
#define EPS (1e-10)
#define INF (1LL<<61)
#define CL(A,I) (memset(A,I,sizeof(A)))
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()

const string rps = "RSPRSP";
bool le(char a, char b) {
    if(a==b) return 1;
    for(ll i=0; i < (ll)rps.size(); i+=2) {
        if(rps[i]==a && rps[i+1]==b) return 1;
        if(rps[i]==b && rps[i+1]==a) return 0;
    }
}

ll n,k;
string s;
const ll N = 107;
ll pw[N];
char DP[N][N];

char dp(ll k, ll pref) {
    char &ret = DP[k][pref];
    if(~ret) return ret;
    if(k==0) return ret = s[pref];
    char l = dp(k-1, pref);
    char r = dp(k-1, (pref+pw[k-1])%n);
    if(le(l,r)) return ret=l;
    else return ret=r;
}

int main(void) {
    ios_base::sync_with_stdio(false);
    CL(DP,-1);
    cin >> n >> k >> s;
    pw[0] = 1;
    FOR(i,1,N) pw[i]=(pw[i-1]*2)%n;
    cout << dp(k, 0) << endl;
    return 0;
}


#include <bits/stdc++.h>

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

typedef long long ll;

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

int mod = 1000000007;

ll COM[250][250];

void COMinit(){
    COM[1][0] = COM[1][1] = 1;
    for(int i = 2; i < 250; i++){
        for(int j = 0; j <= i; j++){
            if(j == 0 || j == i) COM[i][j] = 1;
            else COM[i][j] = COM[i-1][j-1] + COM[i-1][j];
        }
    }
}

int main(void){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    ll L; cin >> L;
    COMinit();
    L -= 12;
    cout << COM[L+11][11] << endl;
    return 0;
}

#include<bits/stdc++.h>
#define ss second
#define ff first
#define Mem(x,val) memset(x,val,sizeof x)
#define pb push_back
#define all(v) v.begin(),v.end()
#define unik(v)  v.erase(unique(v.begin(),v.end()),v.end())
#define cerr(x) cerr << __LINE__ << " th Line : " << #x << " = " << x << "\n"
#define debug(a,b) cerr << #a<<" = "<<a<<"   |   "<<#b<<" = "<<b<<'\n'
#define endl '\n'
#define SZ(a) ((int)a.size())
using namespace std;
using ll = long long;
typedef pair<int, int> pi;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<pi> vpi;
typedef vector<pll> vpll;
const int nax = 300000+10;

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

	int l; cin >> l;
	ll ans = 1;
	for(int i=1; i<12; i++){
		ans *= l - i;
		ans /= i;
	}
	cout << ans << endl;

	return 0;
}