package day02; public class TestDemo { public static void main(String[] args) { int d=3; int m; int num =0; int count=0; while(d>=3){ num=d/3; d=d%3; d=d+num; count=count+num; } System.out.println(count); } }