#include <bits/stdc++.h>
#define ll long long
#define pb push_back;
using namespace std;
using namespace std::chrono;
long long fpb(long long x, long long y) { 
    return (y == 0) ? x : fpb(y, x % y); 
}
long long kpk(long long x, long long y) { 
    return x * (y / fpb(x, y)); 
}
bool cmp(long long a,long long b)
{
    return a>b;
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    auto begin = high_resolution_clock::now();
    ll n;
    cin>>n;
    
    ll ans=0;
    for(ll i=1;i<=1000000;i++){
        string s=to_string(i);
        if (stoll(s+s)>n){
            break;
        }else{
            ans++;
        }
    }
    cout<<ans<<"\n";
    auto stop = high_resolution_clock::now(); 
    auto duration = duration_cast<milliseconds>(stop - begin);
    // cout<<duration.count()<<"\n"; 
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
    char a;
    cin >> a;
    for (int i = 1; i < 3;i++)
    {
        char k;
        cin >> k;
        printf("%c", k);
    }
    printf("%c", a);
}