Cases to find maximum number of digits to be removed
if ( zero > 0 ) document . write ( N - 1 + " " ) ; else if ( one > 0 && two > 0 ) document . write ( N - 2 + " " ) ; else if ( one > 2 two > 2 ) document . write ( N - 3 + " " ) ; else document . write ( - 1 + " " ) ; }