#include <bits/stdc++.h>
using namespace std;
int main(){
int a,s,d,f,m,l,k=0;
cin>>l;
for(a=1;a<=l;a++){
s=a%10;
d=a/10%10;
f=a/100;
m=s+d+f;
if(m==10){
k=k+1;
}
}
cout<<k<<endl;
}
/**************************************************************
Problem: 1985
User: tonghuawei
Language: C++
Result: Accepted
Time:14 ms
Memory:2072 kb
****************************************************************/