n=int(input())s=0while n!=0: k=n%10 if k!=5: n=n//10 continue s+=1 n=n//10print(s)
15265425522 5
4
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!