#include <iostream>
#include <vector>
#include <queue>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <map>
#include <string>
#include <algorithm>
#include <tuple>
#include <array>
#include <climits>
#include <cmath>
#include <iomanip>
 
using namespace std;

typedef long long ll;

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

    ll dp[L][12];

    for (int i = 0; i < L; ++i) {
        for (int j = 0; j < 12; ++j) {
            if (i == 0 || j > i) {
                dp[i][j] = 0;
            } else if (j == 0 || i==j) {
                dp[i][j] = 1;
            } else {
                dp[i][j] = dp[i-1][j-1] + dp[i-1][j];
            }
        }
    }


    cout << dp[L-1][11];
    return 0;
}
#include<iostream>
#include<cmath>
 
using namespace std;
int  main()
{
   long long int n;
   cin>>n;
   long long int c=0,x=0;
 
   long long int h=1e10,l=0;
long long int m=0;
 
   while(h-l>1)
    {
        m=l+(h-l)/2;
 
       if(m*(m+1)/2<=n+1)
       {
           l=m;
       }
       else
 
       {
           h=m;
       }
 
   }
   //cout<<l<<" ";
   cout<<n-l+1;
}