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

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

#define ll long long
#define FOR(i,a,b,c) for(int i=a;i<b;i+=c)
#define REV(i,a,b,c) for(int i=a;i>=b;i-=c)
#define all(x) x.begin(),x.end()

using namespace std;
using namespace __gnu_pbds;

typedef tree
<int,null_type,less <int>,rb_tree_tag,tree_order_statistics_node_update>
indexed_set;

typedef tree
<int,null_type,less_equal <int>,rb_tree_tag,tree_order_statistics_node_update>
indexed_multiset;

template <typename T>
istream & operator>>(istream &is, vector<T> &v) {
    for(auto &data:v){
        is>>data;
    }
    return is;
}

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

class BUNrEaDaBlESTrInG {
public:
	void solve(std::istream& in, std::ostream& out) {
	    int T=1;
	    while(T--){
	        string s;
	        in>>s;
	        int n=s.size();
	        string ans="Yes";
	        FOR(i,0,n,1){
	            if(i%2==0){
	                if(s[i]>=97 and s[i]<=122){

	                }
	                else{
	                    ans="No";
	                }
	            }
	            else{
	                if(s[i]>=65 and s[i]<=90){

	                }
	                else{
	                    ans="No";
	                }
	            }
	        }
	        out<<ans<< "\n";
	    }
	}
};


int32_t main() {
	std::ios_base::sync_with_stdio(false);
	cin.tie(NULL);
    BUNrEaDaBlESTrInG solver;
	std::istream& in(std::cin);
	std::ostream& out(std::cout);
	solver.solve(in, out);
	return 0;
}

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

#define inf 1001000009
#define infmx 1e18ll
#define ff first
#define ss second
#define ll long long
#define pb push_back
#define IOS ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
#define all(x) x.begin(),x.end()
///debug
#define wh(x)   cerr<<#x<<" is "<<x<<endl;
#define error(args...){string _s=#args;replace(_s.begin(),_s.end(),',',' ');stringstream _ss(_s);istream_iterator<string> _it(_ss);err(_it,args);}
void err(istream_iterator<string>it){cout<<endl;}
template<class H,class... T>void err(istream_iterator<string>it,H a,T... t){cerr<<*it<<" = "<<a<<" | ";err(++it,t...);}
template<class S,class T>ostream&operator<<(ostream&os,pair<S,T>p){os<<"["<<p.first<<", "<<p.second<<"]";return os;};
template<class T>auto&operator<<(ostream& os,vector<T>_v){bool a=1;for(auto x:_v){os<<(a?"":" ")<<x;a=0;}return os;}
///
typedef pair<int,int>pi;
typedef pair<long long,long long>pll;
typedef pair<pi,int>ppi;
typedef pair<int,pi>pip;
typedef vector<int>vi;
typedef vector<pi>vpi;
const int mod=1e9+7;
ll power(ll a,ll p){ll r=1,y=a;while(p){if(p&1)r=(1LL*r*y)%mod;p>>=1;y=(1LL*y*y)%mod;}return r;}

const int N=2100000;
int ara[N];


int main()
{
    IOS;
    ll n;cin>>n;
    ll l=0,r=2000000000;
    while(l<=r){
        ll mid=(l+r)>>1;
        if(mid*(mid+1)/2>(n+1))r=mid-1;
        else l=mid+1;
    }
//    cout<<r<<endl;
    cout<<n-r+1<<endl;
}

