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

int main(){
    string s;
    cin >> s;
    for (int i = 0; i < s.length(); i += 2){
        if (!('a' <= s[i] && s[i] <= 'z')) {
            cout << "No";
            return 0;
        }
    }
    for (int i = 1; i < s.length(); i += 2){
        if (!('A' <= s[i] && s[i] <= 'Z')) {
            cout << "No";
            return 0;
        }
    }
    cout << "Yes";
}
#include <bits/stdc++.h>
using namespace std;

long digit(long x){
if(x < 10){
  return 1;
}
long s = 1 + digit(x/10);
return s;
}

long nine(long x){
long s = pow(10,digit(x)-1) - 1;
return s;
}

int main(){
long num,a,b,c; cin >> num;
if(digit(num)%2 == 1){
  c = pow(10,digit(num) - 1);
  num = nine(num);
}
c = pow(10,digit(num)/2);
a = num / c; b = num % c;
if(a <= b){
  cout << a << endl;
}else{
  cout << a - 1 << endl;
}
}