using System;
using System.Collections.Generic;
using System.Diagnostics.Metrics;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Xml;

namespace ConsoleApplication1
{
    class Program
    {
        static int najmanji(int[,] mat, int n, int m)
        {
            int br = 0;
            for (int i = 0; i < n; i++)
            {
                for (int j = 0; j < m; j++)
                {
                    if (i == 0 || i == n - 1 || j == 0 || j == m - 1)
                    {
                        br++;
                    }
                    else if (i!=0 || i!=n-1 && j!=0 || j!=m-1)
                    {
                        if (i % 2 != 0)
                        {
                            if (j % 2 == 0) br++;
                        }
                        else
                        {
                            if (j % 2 != 0) br++;
                        }
                    }                  
                }
            }
            return br;
        }        
        static void Main(string[] args)
        {
            string red = Console.ReadLine();
            string[] delovi = red.Split();
            int n = int.Parse(delovi[0]);
            int m = int.Parse(delovi[1]);
            int[,] mat = new int[n, m];
            Console.WriteLine(najmanji(mat, n, m));
            Console.ReadLine();
        }
    }
}