using System; using System.Collections.Generic; using System.Linq; class Program { internal static void Main() => new Program().Solve(); void Solve() { //code var h = IO.Read(); var w = IO.Read(); int ans; if (h % 2 == 0) { if (w % 2 == 0) { ans = h * w; IO.Write(ans); } else { ans = h * (w - 1); IO.Write(ans); } } else { if (w % 2 == 0) { ans = (h - 1) * w; IO.Write(ans); } else { ans = (h - 1) * (w - 1) + 2; IO.Write(ans); } } #region A //int n = IO.Read(); //var linklist = new LinkedList(); //for (int i = 1; i <= n; i++) //{ // linklist.AddLast(i); //} //for (int i = 0; i < n; i++) //{ // IO.WriteEnum(linklist); // LinkedListNode node = linklist.First; // linklist.RemoveFirst(); // linklist.AddLast(node); //} #endregion } } static class IO { static readonly Queue que = new Queue(); public static T Read() { if (!que.Any()) foreach (var s in Console.ReadLine().Split()) que.Enqueue(s); return (T)Convert.ChangeType(que.Dequeue(), typeof(T)); } public static IEnumerable ReadEnum(long n) { for (long i = 0; i < n; i++) yield return Read(); } public static void Write(T item) => Console.WriteLine(item); public static void WriteEnum(IEnumerable items, string separetor = " ") => Write(string.Join(separetor, items)); }