#include <bits/stdc++.h> using namespace std; int main(){ int i=1,b,j,h=0,n; cin>>n; for(i=1;i<=n;i++){ j=i; if(i%5==0){ while(j>0){ b=j%10; j=j/10; break; } if(b==5){ h++; } } } cout<<h<<endl; } /************************************************************** Problem: 1057 User: linweilun Language: C++ Result: Wrong Answer ****************************************************************/