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