import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static byte rightZeros(long n) {
		for (byte z = 0; ; z++, n /= 10) {
			if (n < 10 || n % 10 != 0) return z;
		}
	}
	
	public static void main (String[] args) throws java.lang.Exception
	{
		System.out.println(rightZeros(123000L));
		System.out.println(rightZeros(102030L));
		System.out.println(rightZeros(123123L));
		System.out.println(rightZeros(10L));
		System.out.println(rightZeros(1L));
		System.out.println(rightZeros(0L));
	}
}