public static void Main(int[] args)
Maths Maths = new Maths();
Maths.a = int.Parse(Console.ReadLine());
Maths.c = int.Parse(Console.ReadLine());
Maths.h = int.Parse(Console.ReadLine());
int S = ((Maths.a + Maths.c) * Maths.h) / 2;
Console.WriteLine("S = {0}",S);