using System.Collections.Generic;
static int DesignerPdfViewer(int[] h, string word)
char[] asciiChars = "abcdefghijklmnopqrstuvwxyz".ToCharArray();
List<int> letterHeights = new List<int>();
letterHeights.Add(h[Array.IndexOf(asciiChars, c)]);
maxLetterHeight = letterHeights.Max();
return maxLetterHeight * word.Length;
static void Main(string[] args)
int[] h = Array.ConvertAll("1 3 1 3 1 4 1 3 2 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5".Split(' '), hTemp => Convert.ToInt32(hTemp));
int result = DesignerPdfViewer(h, word);
Console.WriteLine(result);
h = Array.ConvertAll("1 3 1 3 1 4 1 3 2 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 7".Split(' '), hTemp => Convert.ToInt32(hTemp));
result = DesignerPdfViewer(h, word);
Console.WriteLine(result);