#include <iostream>
using namespace std;
bool check(int x)
{
int cnt=1;
while(x)
{
if(cnt%2==1)
{
if(x%10%2!=1)
return false;
}
else
{
if(x%10%2!=0)
return false;
}
cnt++;
x/=10;
}
return true;
}
int main()
{
int n;
cin>>n;
int ans=0;
for(int i=1;i<=n;i++)
if(check(i))
ans++;
cout<<ans;
return 0;
}