public static void main(String[] args) {
		String[] words = {"one","two","three","four","five","six",
						"seven","eight","nine","ten","eleven","twelve",
						"thirteen","fourteen","fifteen","sixteen","seventeen",
						"eighteen", "nineteen", "twenty", "thirty", "forty",
						"fifty", "sixty", "seventy", "eighty", "ninety", "hundred","thousand"};
		int total = 0;
		for (int count = 1; count <= 1000; count++) {
			String number = "";
			if (count <= 20) {
				number = words[count-1];
			}
			else {
				String pickNumber = Integer.toString(count);
				if (pickNumber.length() == 2) {
					number += words[Integer.parseInt(pickNumber.substring(0,1))+17];
					if (Integer.parseInt(pickNumber.substring(1)) != 0) {
						number += words[Integer.parseInt(pickNumber.substring(1))-1];
					}
				}
				else if (pickNumber.length() == 3) {
					number += words[Integer.parseInt(pickNumber.substring(0,1))-1];
					number += words[27];
					if (!pickNumber.substring(1).equals("00")) {
					number += "and";
						if (Integer.parseInt(pickNumber.substring(1)) <= 20) {
							number += words[Integer.parseInt(pickNumber.substring(1)) -1];
						}
						else {
							number += words[Integer.parseInt(pickNumber.substring(1,2))+17];
							if (Integer.parseInt(pickNumber.substring(2)) != 0) {
								number += words[Integer.parseInt(pickNumber.substring(2))-1];
							}
						}
					}
				}
				else {
					number += words[0];
					number += words[28];
				}
			}
			System.out.println(count + "|" + number);
			total += number.length();
		}
		System.out.println(total);
	}