#include <bits/stdc++.h>
using namespace std;
int main(){
int i=1,j=0,n,h=0,m=0;
cin>>n;
while(i<=n){
h=0;
j=i;
while(j>0){
h=h+j%10;
j=j/10;
}
if(h==10){
m=m+1;
}
i++;
}
cout<<m;
}
/**************************************************************
Problem: 1985
User: 15159808820
Language: C++
Result: Accepted
Time:8 ms
Memory:2072 kb
****************************************************************/