The input will consist of a sequence of integers in the range 1 to 100, terminated by a zero. For each such integer n, except the final zero, determine the number of different types of characters needed to number the prefix pages 1 through n with Roman numerals.