#include <iostream> 
#include <string>
using namespace std;
int main() {
  string s;
  cin >> s;
  s.push_back(s[0]);
  s.erase(s.begin());
  cout << s << endl;
  return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
using ll = long long;
const int INF = 1001001001;
const ll LINF = 1002003004005006007ll;

void solve(){
ll n;cin >> n;
rep(i,pow(10,5)){
  if((2*n)<=(i*(i+1))){
    cout << i << endl;
    return;
  }
}
  return;
}

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

  solve();
    return 0;
}