#include <bits/stdc++.h>
#include <unordered_set>
#include <algorithm>

using namespace std;

using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vll = vector<ll>;
using vs = vector<string>;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repll(i,n) for (ll i = 0; i < (ll)(n); i++)
#define fore(x,a) for(auto&(x) : (a))

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

#define ALL(a) (a).begin(), (a).end()

const ll INFL = 1e18;
const int INFI = 1e9;
const int MOD = 1e9 + 7;

int main(){
  string S;
  cin >> S;
  cout << S[1] << S[2] << S[0] << endl;
} 
#include <bits/stdc++.h>
using namespace std;

int32_t main()
{
    int t = 1;
    while(t--)
    {
        int n, ans;
        cin>>n;

        for( int i = 1; i < 1e5; i++ )
        {
            n -= i;
            if( n <= 0 )
            {   
                ans = i;
                break;
            }
        }

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

    return 0;
}