n=int(input())m=0while n>0: if n%10>m: m=n%10 n=n//10print(m)
14356232
6
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!