public static void Main()
string input = @"input.txt";
List<Int32> caloriesChunk = new List<Int32>();
List<Int32> elvesCalories = new List<Int32>();
StreamReader file = new StreamReader(input);
while((fruitCalorie=file.ReadLine()) != null)
if(!string.IsNullOrEmpty(fruitCalorie))
caloriesChunk.Add(Convert.ToInt32(fruitCalorie));
else if (string.IsNullOrEmpty(fruitCalorie))
elvesCalories.Add(caloriesChunk.Sum());
Console.WriteLine("Elf #{0} is carrying the most calories at a whopping: {1}cal.", elvesCalories.IndexOf(elvesCalories.Max()), elvesCalories.Max());
Console.WriteLine("Make sure you didn't forget to place input.txt in the same directory as this program.");