public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long num = sc.nextInt(); int count = 0; long temp = 1; while (num / 10 != 0) { //每次来把数字转成字符串 //String s=Double.toString(num); //循环获取乘积 count++; while (num % 10 != 0||String.valueOf(num).length()>1) { long now= num % 10; num=num/10; temp = temp * now; } num = temp; temp = 1; } System.out.println(count); } }