using System.Collections.Generic;
public static void Main()
string[] first = {"","one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"};
string[] seconds = {"", "","twenty","thirty", "forty", "fifty", "sixty", "seventy", "eighty" ,"ninety"};
string[] finals = {"","onehundred", "twohundred", "threehundred", "fourhundred", "fivehundred", "sixhundred", "sevenhundred", "eighthundred", "ninehundred"};
Dictionary<string, int> values = new Dictionary<string, int>();
for(int i = 1; i <= 1000; i++)
string position = i.ToString();
int pos = (int)Char.GetNumericValue(position[0]);
count = count + first[i].Length;
count+= first[i%10].Length;
count += seconds[pos].Length;
count += finals[pos].Length;
count+= first[num].Length;
count+= first[num%10].Length;
count += seconds[pos].Length;
Console.WriteLine(count);