using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{

    class Program
    {

        static void Main(string[] args)
        {
            int[] arr = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
            int n = arr[0];
            int m = arr[1];
            if (n == 1 || m == 1)
            {
                Console.WriteLine(n*m);
                return;
            }
            if (n == 2 || m == 2)
            {
                int k;
                if (n == 2)
                    k = m;
                else
                    k = n;
                int z = 0;
                for (int i = 0; i < k; i++)
                {
                    if (i % 4 == 0)
                        z += 1;
                    if (i % 4 == 1)
                        z++;
                }
                Console.WriteLine(z*2);
                return;
            }
            int kk = 0;
            for (int i = 0; i < n; i++)
            {
                    if (i % 2 == 0)
                    {
                        kk += (m + 1) / 2;
                    }
                    else
                    {
                        kk += m / 2;
                    }

            }
            Console.WriteLine(kk);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace Contest
{
    class Program
    {

        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s));
            var n = input.First();
            var m = input.Last();
            int sum = 0;
            if (n == 1 || m == 1)
            {
                var t = 1;
                t ^= n ^ m;
                sum = t;
            }
            else
                if (n == 2 || m == 2)
                {
                    var t = 2;
                    t ^= n ^ m;
                    sum = (t / 4)*4;
                    var l = t % 4;
                    if(l>0)
                    sum += (l > 1 ? 2 : 1)*2;
                }
                else sum = (n * m) / 2 + (n * m) % 2;
            Console.WriteLine(sum);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

public class taskB
{
    public class MyReader
    {
        private TextReader instream;

        public int[] ReadIntArray()
        {
            string inp = instream.ReadLine().Trim();
            string[] spl = inp.Split(' ');

            int[] a = new int[spl.Length];
            for (int i = 0; i < a.Length; i++)
                a[i] = int.Parse(spl[i]);
            return a;
        }

        public long[] ReadLongArray()
        {
            string inp = instream.ReadLine().Trim();
            string[] spl = inp.Split(' ');

            long[] a = new long[spl.Length];
            for (int i = 0; i < a.Length; i++)
                a[i] = long.Parse(spl[i]);
            return a;
        }

        public double[] ReadDoubleArray()
        {
            string inp = instream.ReadLine().Trim();
            string[] spl = inp.Split(' ');

            double[] a = new double[spl.Length];

            System.Globalization.NumberFormatInfo nfi = new System.Globalization.NumberFormatInfo();
            nfi.NumberDecimalSeparator = ".";
            for (int i = 0; i < a.Length; i++)
                a[i] = double.Parse(spl[i], nfi);
            return a;
        }

        public int ReadInt()
        {
            return int.Parse(instream.ReadLine());
        }

        public long ReadLong()
        {
            return long.Parse(instream.ReadLine());
        }

        public void SetInStream(TextReader textReader)
        {
            this.instream = textReader;
        }

        internal string ReadLine()
        {
            return instream.ReadLine();
        }
    }

    static void Main(string[] args)
    {
        MyReader instream = new MyReader();
        instream.SetInStream(Console.In);

        TextWriter outstream = Console.Out;

        solve(instream, outstream);

    }

    private static void solve(MyReader instream, TextWriter outstream)
    {
        int[] ab = instream.ReadIntArray();

        int a = ab[0];
        int b = ab[1];

        if (a > b)
        {
            int t = a;
            a = b;
            b = t;
        }

        int r1 = a * ((b-1) / 3+1);
        int r2 = ((a-1) / 3 + 1) * b;

        int r3 = a * b / 2 + ((a * b) % 2 == 0 ? 0 : 1);

        int res = Math.Max(Math.Max(r1, r2), r3);

        if (a == 2)
        {
            if (b % 4 == 1)
            {
                res = b / 4 * 4 + 2;
            }
            else if (b % 4 == 2 || b % 4 == 3)
            {
                res = b / 4 * 4 + 4;
            }
        }
        outstream.WriteLine(res);
    }

}

using System;
using System.IO;
using System.Text;

namespace Help_General
{
    internal class Program
    {
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        private static void Main(string[] args)
        {
            int n = Next();
            int m = Next();

            int max = m*n/2;
            if (n%2 == 1 && m%2 == 1)
            {
                max++;
            }

            max = Math.Max(max, n*((m + 2)/3));
            max = Math.Max(max, m*((n + 2)/3));

            max = Math.Max(max, C2(n)*C2(m));

            if (n == 3 && m > 4 && (m%3 == 0 || m%3 == 2))
                max = Math.Max(max, 2 + n*((m + 2)/3));

            if (m == 3 && n > 4 && (n%3 == 0 || n%3 == 2))
                max = Math.Max(max, 2 + m*((n + 2)/3));

            writer.WriteLine(max);
            writer.Flush();
        }

        private static int C2(int n)
        {
            if (n%4 == 1)
            {
                return 2*((n + 2)/4) + 1;
            }
            return 2*((n + 2)/4);
        }

        private static int Next()
        {
            int c;
            int res = 0;
            do
            {
                c = reader.Read();
                if (c == -1)
                    return res;
            } while (c < '0' || c > '9');
            res = c - '0';
            while (true)
            {
                c = reader.Read();
                if (c < '0' || c > '9')
                    return res;
                res *= 10;
                res += c - '0';
            }
        }
    }
}

using System;
using System.Collections.Generic;

class Scanner
{
    string[] s;
    int i;

    char[] cs = new char[] { ' ' };

    public Scanner()
    {
        s = new string[0];
        i = 0;
    }

    public string next()
    {
        if (i < s.Length) return s[i++];
        s = Console.ReadLine().Split(cs, StringSplitOptions.RemoveEmptyEntries);
        i = 0;
        return s[i++];
    }

    public int nextInt()
    {
        return int.Parse(next());
    }

    public long nextLong()
    {
        return long.Parse(next());
    }

}

class Myon
{
    Scanner cin;
    Random r;
    Myon() { }

    public static void Main()
    {
        new Myon().calc();
    }

    List<int> ret = new List<int>();

    int[,] dp;

    void calc()
    {
        cin = new Scanner();
        int n = cin.nextInt();
        int m = cin.nextInt();
        dp = new int[n + 1, m + 1];
        Console.WriteLine(saiki(n, m));
    }

    int saiki(int a, int b)
    {
        if (a == 0 && b == 0) return a;
        if (dp[a, b] != 0) return dp[a, b];
        int reta = (a / 4) * 2 + Math.Min(a % 4, 2);
        int retb = (b / 4) * 2 + Math.Min(b % 4, 2);
        int ret = reta * retb;
        ret = Math.Max((a + 2) / 3 * b, ret);
        ret = Math.Max((b + 2) / 3 * a, ret);
        if (a > 3) ret = Math.Max(ret, saiki(a - 3, b) + b);
        if (b > 3) ret = Math.Max(ret, saiki(a, b - 3) + a);
        ret = Math.Max(ret, (a * b + 1) / 2);
        return dp[a, b] = ret;
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace Contest
{
    class Program
    {

        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ').Select(s=>int.Parse(s));
            var n = input.First();
            var m = input.Last();
            if ((double)n / 3 > (double)m / 3)
            {
                var t = (n / 3) % 1 > 0.5 ? Math.Round((double)n / 3) : Math.Round(n / 3 + .5);
                Console.WriteLine(t * m);
            }
            else
            {
                var t = (m / 3) % 1 > 0.5 ? Math.Round((double)m / 3) : Math.Round(m / 3 + .5);
                Console.WriteLine(t * n);
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace Contest
{
    class Program
    {

        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s));
            var n = input.First();
            var m = input.Last();
            int sum = 0;
            if (n == 1 || m == 1)
            {
                var t = 1;
                t ^= n ^ m;
                sum = t;
            }
            else
                if (((n == 2) && (m % 2 != 0)) || ((m == 2) && (n % 2 != 0)))
                {
                    var t = 2;
                    t ^= n ^ m;
                    sum = t + 1;
                }
                else
                    if (n % 2 == 0)
                    {
                        var low = (int)m / 2;
                        var up = low + m % 2;
                        sum = (low + up) * (n / 2);
                    }
                    else if (m % 2 == 0)
                    {
                        var low = (int)n / 2;
                        var up = low + n % 2;
                        sum = (low + up) * (m / 2);
                    }
                    else
                    {
                        var low = (int)n / 2;
                        var up = low + n % 2;
                        sum = (low + up) * (m / 2);
                        sum += up;
                    }
            Console.WriteLine(sum);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace Contest
{
    class Program
    {

        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s));
            var n = input.First();
            var m = input.Last();
            int sum = 0;
            if (n == 1 || m == 1)
            {
                var t = 1;
                t ^= n ^ m;
                sum = t;
            }
            if (((n == 2) && (m % 2 != 0)) || ((m == 2) && (n % 2 != 0)))
            {
                var t = 2;
                t ^= n ^ m;
                sum = t+1;
            }
            else
                if (n % 2 == 0)
                {
                    var low = (int)m / 2;
                    var up = low + m % 2;
                    sum = (low + up) * (n / 2);
                }
                else if (m % 2 == 0)
                {
                    var low = (int)n / 2;
                    var up = low + n % 2;
                    sum = (low + up) * (m / 2);
                }
                else
                {
                    var low = (int)n / 2;
                    var up = low + n % 2;
                    sum = (low + up) * (m / 2);
                    sum += up;
                }
            Console.WriteLine(sum);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace Contest
{
    class Program
    {

        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s));
            var n = input.First();
            var m = input.Last();
            int sum = 0;
            if (n % 2 == 0)
            {
                var low = (int)Math.Round((double)n / 2);
                var up = low;
                sum = (low + up) * (m / 2);
            }
            else
            {
                var low = (int)Math.Round((double)(m / 2) );
                var up = (int)Math.Round((double)(m / 2)+.51);
                sum = (low + up) * (n / 2);
                if (m % 2 != 0) sum += up;
            }
            Console.WriteLine(sum);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace Contest
{
    class Program
    {

        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s));
            var n = input.First();
            var m = input.Last();
            int sum = 0;
            if (n % 2 == 0)
            {
                var low = (int)Math.Round((double)n / 2);
                var up = (int)Math.Round(n / 2 + .5);
                sum = (low + up) * m / 2;
            }
            else
            {
                var low = (int)Math.Round((double)(m / 2) );
                var up = (int)Math.Round((double)(m / 2)+.51);
                sum = (low + up) * (n / 2);
                if (m % 2 != 0) sum += up;
            }
            Console.WriteLine(sum);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace Contest
{
    class Program
    {

        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s));
            var n = input.First();
            var m = input.Last();
            int sum = 0;
            if (n == 1 || m == 1)
            {
                var t = 1;
                t ^= n ^ m;
                sum = t;
            }
            else
                if (n == 2|| m == 2)
                {
                    var t = 2;
                    var tt = (m + n) ^ t;
                    t ^= n ^ m;
                    sum = tt%2==0?t+2:t+1;
                }
                else
                    if (n % 2 == 0)
                    {
                        var low = (int)m / 2;
                        var up = low + m % 2;
                        sum = (low + up) * (n / 2);
                    }
                    else if (m % 2 == 0)
                    {
                        var low = (int)n / 2;
                        var up = low + n % 2;
                        sum = (low + up) * (m / 2);
                    }
                    else
                    {
                        var low = (int)n / 2;
                        var up = low + n % 2;
                        sum = (low + up) * (m / 2);
                        sum += up;
                    }
            Console.WriteLine(sum);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace Contest
{
    class Program
    {

        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ').Select(s=>double.Parse(s));
            var n = input.First();
            var m = input.Last();
            if (n / 3 > m / 3)
            {
                var t = (n / 3) % 1 > 0.5 ? Math.Round(n / 3) : Math.Round(n / 3 + .5);
                Console.WriteLine(t * m);
            }
            else
            {
                var t = (m / 3) % 1 > 0.5 ? Math.Round(m / 3) : Math.Round(m / 3 + .5);
                Console.WriteLine(t * n);
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace Contest
{
    class Program
    {

        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s));
            var n = input.First();
            var m = input.Last();
            int sum = 0;
            if (n % 2 == 0)
            {
                var low = (int)m / 2;
                var up = low + m % 2;
                sum = (low + up) * (n / 2);
            }
            else if (m % 2 == 0)
            {
                var low = (int)n / 2;
                var up = low + n % 2;
                sum = (low + up) * (m / 2);
            }
            else
            {
                var low = (int)n / 2;
                var up = low + n%2;
                sum = (low + up) * (m / 2);
                sum += up;
            }
            Console.WriteLine(sum);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace Contest
{
    class Program
    {

        static void Main(string[] args)
        {
            var input = Console.ReadLine().Split(' ').Select(s => int.Parse(s));
            var n = input.First();
            var m = input.Last();
            int sum = 0;
            if (n == 1 || m == 1)
            {
                var t = 1;
                t ^= n ^ m;
                sum = t;
            }
            else
                if (n % 2 == 0)
                {
                    var low = (int)m / 2;
                    var up = low + m % 2;
                    sum = (low + up) * (n / 2);
                }
                else if (m % 2 == 0)
                {
                    var low = (int)n / 2;
                    var up = low + n % 2;
                    sum = (low + up) * (m / 2);
                }
                else
                {
                    var low = (int)n / 2;
                    var up = low + n % 2;
                    sum = (low + up) * (m / 2);
                    sum += up;
                }
            Console.WriteLine(sum);
        }
    }
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{

    class Program
    {

        static void Main(string[] args)
        {
            int[] arr = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray();
            int n = arr[0];
            int m = arr[1];
            if (n == 1 || m == 1)
            {
                Console.WriteLine(n*m);
                return;
            }
            if (n == 2 || m == 2)
            {
                int k;
                if (n == 2)
                    k = m;
                else
                    k = n;
                int z = 0;
                for (int i = 0; i < k; i+=4)
                {
                    z += 2;
                }
                if (k % 2 != 0)
                    z -= 1;
                Console.WriteLine(z*2);
                return;
            }
            int kk = 0;
            for (int i = 0; i < n; i++)
            {
                    if (i % 2 == 0)
                    {
                        kk += (m + 1) / 2;
                    }
                    else
                    {
                        kk += m / 2;
                    }

            }
            Console.WriteLine(kk);
        }
    }
}

using System;
using System.Collections.Generic;

class Scanner
{
    string[] s;
    int i;

    char[] cs = new char[] { ' ' };

    public Scanner()
    {
        s = new string[0];
        i = 0;
    }

    public string next()
    {
        if (i < s.Length) return s[i++];
        s = Console.ReadLine().Split(cs, StringSplitOptions.RemoveEmptyEntries);
        i = 0;
        return s[i++];
    }

    public int nextInt()
    {
        return int.Parse(next());
    }

    public long nextLong()
    {
        return long.Parse(next());
    }

}

class Myon
{
    Scanner cin;
    Random r;
    Myon() { }

    public static void Main()
    {
        new Myon().calc();
    }

    List<int> ret = new List<int>();

    static int[, ,] dp;
    static int[, ,] preput;

    void calc()
    {
        cin = new Scanner();
        int n = cin.nextInt();
        int m = cin.nextInt();
        int ret = Math.Max((n + 2) / 3 * m, (m + 2) / 3 * n);
        Console.WriteLine(ret);
    }
}

using System;
using System.Collections.Generic;

class Scanner
{
    string[] s;
    int i;

    char[] cs = new char[] { ' ' };

    public Scanner()
    {
        s = new string[0];
        i = 0;
    }

    public string next()
    {
        if (i < s.Length) return s[i++];
        s = Console.ReadLine().Split(cs, StringSplitOptions.RemoveEmptyEntries);
        i = 0;
        return s[i++];
    }

    public int nextInt()
    {
        return int.Parse(next());
    }

    public long nextLong()
    {
        return long.Parse(next());
    }

}

class Myon
{
    Scanner cin;
    Random r;
    Myon() { }

    public static void Main()
    {
        new Myon().calc();
    }

    List<int> ret = new List<int>();

    static int[, ,] dp;
    static int[, ,] preput;

    void calc()
    {
        cin = new Scanner();
        int n = cin.nextInt();
        int m = cin.nextInt();
        int ret = Math.Max((n + 2) / 3 * m, (m + 2) / 3 * n);
        ret = Math.Max(ret, (n / 4 * 2 + Math.Min(2, n % 4)) * (m / 4 * 2 + Math.Min(2, m % 4)));
        Console.WriteLine(ret);
    }
}

using System;
using System.Collections.Generic;

class Scanner
{
    string[] s;
    int i;

    char[] cs = new char[] { ' ' };

    public Scanner()
    {
        s = new string[0];
        i = 0;
    }

    public string next()
    {
        if (i < s.Length) return s[i++];
        s = Console.ReadLine().Split(cs, StringSplitOptions.RemoveEmptyEntries);
        i = 0;
        return s[i++];
    }

    public int nextInt()
    {
        return int.Parse(next());
    }

    public long nextLong()
    {
        return long.Parse(next());
    }

}

class Myon
{
    Scanner cin;
    Random r;
    Myon() { }

    public static void Main()
    {
        new Myon().calc();
    }

    List<int> ret = new List<int>();

    int[,] dp;

    void calc()
    {
        cin = new Scanner();
        int n = cin.nextInt();
        int m = cin.nextInt();
        dp = new int[n + 1, m + 1];
        Console.WriteLine(saiki(n, m));
    }

    int saiki(int a, int b)
    {
        if (a == 0 && b == 0) return a;
        if (dp[a, b] != 0) return dp[a, b];
        int reta = (a / 4) + Math.Min(a % 4, 2);
        int retb = (b / 4) + Math.Min(b % 4, 2);
        int ret = reta * retb;
        ret = Math.Max((a + 2) / 3 * b, ret);
        ret = Math.Max((b + 2) / 3 * a, ret);
        if (a > 3) ret = Math.Max(ret, saiki(a - 3, b) + b);
        if (b > 3) ret = Math.Max(ret, saiki(b - 3, a) + a);
        return dp[a, b] = ret;
    }
}

using System;
using System.IO;
using System.Text;

namespace Help_General
{
    internal class Program
    {
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        private static void Main(string[] args)
        {
            int n = Next();
            int m = Next();

            int max = Math.Max(n*((m + 2)/3), m*((n + 2)/3));

            max = Math.Max(max, C2(n)*C2(m));

            if (n == 3 && m > 4 && (m%3 == 0 || m%3 == 2))
                max = Math.Max(max, 2 + n*((m + 2)/3));

            if (m == 3 && n > 4 && (n%3 == 0 || n%3 == 2))
                max = Math.Max(max, 2 + m*((n + 2)/3));

            writer.WriteLine(max);
            writer.Flush();
        }

        private static int C2(int n)
        {
            if (n%4 == 1)
            {
                return 2*((n + 2)/4) + 1;
            }
            return 2*((n + 2)/4);
        }

        private static int Next()
        {
            int c;
            int res = 0;
            do
            {
                c = reader.Read();
                if (c == -1)
                    return res;
            } while (c < '0' || c > '9');
            res = c - '0';
            while (true)
            {
                c = reader.Read();
                if (c < '0' || c > '9')
                    return res;
                res *= 10;
                res += c - '0';
            }
        }
    }
}

using System;
using System.IO;
using System.Text;

namespace Help_General
{
    internal class Program
    {
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        private static void Main(string[] args)
        {
            int n = Next();
            int m = Next();

            int max = Math.Max(n*((m + 3)/4), m*((n + 3)/4));

            max = Math.Max(max, C2(n)*C2(m));

            writer.WriteLine(max);
            writer.Flush();
        }

        static int C2(int n)
        {
            if (n % 4 == 1)
            {
                return 2*((n + 2)/4) + 1;
            }
            return 2*((n + 2)/4);
        }

        private static int Next()
        {
            int c;
            int res = 0;
            do
            {
                c = reader.Read();
                if (c == -1)
                    return res;
            } while (c < '0' || c > '9');
            res = c - '0';
            while (true)
            {
                c = reader.Read();
                if (c < '0' || c > '9')
                    return res;
                res *= 10;
                res += c - '0';
            }
        }
    }
}

using System;
using System.IO;
using System.Text;

namespace Help_General
{
    internal class Program
    {
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        private static void Main(string[] args)
        {
            int n = Next();
            int m = Next();

            int max = m*n/2;
            if (n%2 == 1 && m%2 == 1)
            {
                max++;
            }

            max = Math.Max(max, n*((m + 2)/3));
            max = Math.Max(max, n*((m + 2)/3));

            max = Math.Max(max, C2(n)*C2(m));

            if (n == 3 && m > 4 && (m%3 == 0 || m%3 == 2))
                max = Math.Max(max, 2 + n*((m + 2)/3));

            if (m == 3 && n > 4 && (n%3 == 0 || n%3 == 2))
                max = Math.Max(max, 2 + m*((n + 2)/3));

            writer.WriteLine(max);
            writer.Flush();
        }

        private static int C2(int n)
        {
            if (n%4 == 1)
            {
                return 2*((n + 2)/4) + 1;
            }
            return 2*((n + 2)/4);
        }

        private static int Next()
        {
            int c;
            int res = 0;
            do
            {
                c = reader.Read();
                if (c == -1)
                    return res;
            } while (c < '0' || c > '9');
            res = c - '0';
            while (true)
            {
                c = reader.Read();
                if (c < '0' || c > '9')
                    return res;
                res *= 10;
                res += c - '0';
            }
        }
    }
}

using System;
using System.IO;
using System.Text;

namespace Help_General
{
    internal class Program
    {
        private static readonly StreamReader reader = new StreamReader(Console.OpenStandardInput(1024*10), Encoding.ASCII, false, 1024*10);
        private static readonly StreamWriter writer = new StreamWriter(Console.OpenStandardOutput(1024*10), Encoding.ASCII, 1024*10);

        private static void Main(string[] args)
        {
            int n = Next();
            int m = Next();

            int max = Math.Max(n*((m + 4)/4), m*((n + 4)/4));

            max = Math.Max(max, C2(n)*C2(m));

            writer.WriteLine(max);
            writer.Flush();
        }

        static int C2(int n)
        {
            if (n % 4 == 1)
            {
                return 2*((n + 2)/4) + 1;
            }
            return 2*((n + 2)/4);
        }

        private static int Next()
        {
            int c;
            int res = 0;
            do
            {
                c = reader.Read();
                if (c == -1)
                    return res;
            } while (c < '0' || c > '9');
            res = c - '0';
            while (true)
            {
                c = reader.Read();
                if (c < '0' || c > '9')
                    return res;
                res *= 10;
                res += c - '0';
            }
        }
    }
}

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

public class taskB
{
    public class MyReader
    {
        private TextReader instream;

        public int[] ReadIntArray()
        {
            string inp = instream.ReadLine().Trim();
            string[] spl = inp.Split(' ');

            int[] a = new int[spl.Length];
            for (int i = 0; i < a.Length; i++)
                a[i] = int.Parse(spl[i]);
            return a;
        }

        public long[] ReadLongArray()
        {
            string inp = instream.ReadLine().Trim();
            string[] spl = inp.Split(' ');

            long[] a = new long[spl.Length];
            for (int i = 0; i < a.Length; i++)
                a[i] = long.Parse(spl[i]);
            return a;
        }

        public double[] ReadDoubleArray()
        {
            string inp = instream.ReadLine().Trim();
            string[] spl = inp.Split(' ');

            double[] a = new double[spl.Length];

            System.Globalization.NumberFormatInfo nfi = new System.Globalization.NumberFormatInfo();
            nfi.NumberDecimalSeparator = ".";
            for (int i = 0; i < a.Length; i++)
                a[i] = double.Parse(spl[i], nfi);
            return a;
        }

        public int ReadInt()
        {
            return int.Parse(instream.ReadLine());
        }

        public long ReadLong()
        {
            return long.Parse(instream.ReadLine());
        }

        public void SetInStream(TextReader textReader)
        {
            this.instream = textReader;
        }

        internal string ReadLine()
        {
            return instream.ReadLine();
        }
    }

    static void Main(string[] args)
    {
        MyReader instream = new MyReader();
        instream.SetInStream(Console.In);

        TextWriter outstream = Console.Out;

        solve(instream, outstream);

    }

    private static void solve(MyReader instream, TextWriter outstream)
    {
        int[] ab = instream.ReadIntArray();

        int a = ab[0];
        int b = ab[1];

        if (a > b)
        {
            int t = a;
            a = b;
            b = t;
        }

        int r1 = a * ((b-1) / 3+1);
        int r2 = ((a-1) / 3 + 1) * b;

        int r3 = a * b / 2 + ((a * b) % 2 == 0 ? 0 : 1);

        int res = Math.Max(Math.Max(r1, r2), r3);

        if (a == 2)
        {
            if (b % 4 == 1)
            {
                res = b / 4 * 4 + 2;
            }
            else if (b % 4 == 2)
            {
                res = b / 4 * 4 + 4;
            }
        }
        outstream.WriteLine(res);
    }

}

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

public class taskB
{
    public class MyReader
    {
        private TextReader instream;

        public int[] ReadIntArray()
        {
            string inp = instream.ReadLine().Trim();
            string[] spl = inp.Split(' ');

            int[] a = new int[spl.Length];
            for (int i = 0; i < a.Length; i++)
                a[i] = int.Parse(spl[i]);
            return a;
        }

        public long[] ReadLongArray()
        {
            string inp = instream.ReadLine().Trim();
            string[] spl = inp.Split(' ');

            long[] a = new long[spl.Length];
            for (int i = 0; i < a.Length; i++)
                a[i] = long.Parse(spl[i]);
            return a;
        }

        public double[] ReadDoubleArray()
        {
            string inp = instream.ReadLine().Trim();
            string[] spl = inp.Split(' ');

            double[] a = new double[spl.Length];

            System.Globalization.NumberFormatInfo nfi = new System.Globalization.NumberFormatInfo();
            nfi.NumberDecimalSeparator = ".";
            for (int i = 0; i < a.Length; i++)
                a[i] = double.Parse(spl[i], nfi);
            return a;
        }

        public int ReadInt()
        {
            return int.Parse(instream.ReadLine());
        }

        public long ReadLong()
        {
            return long.Parse(instream.ReadLine());
        }

        public void SetInStream(TextReader textReader)
        {
            this.instream = textReader;
        }

        internal string ReadLine()
        {
            return instream.ReadLine();
        }
    }

    static void Main(string[] args)
    {
        MyReader instream = new MyReader();
        instream.SetInStream(Console.In);

        TextWriter outstream = Console.Out;

        solve(instream, outstream);

    }

    private static void solve(MyReader instream, TextWriter outstream)
    {
        int[] ab = instream.ReadIntArray();

        int a = ab[0];
        int b = ab[1];

        int r1 = a * ((b-1) / 3+1);
        int r2 = ((a-1) / 3 + 1) * b;

        int res = Math.Max(r1, r2);
        outstream.WriteLine(res);
    }

}

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

public class taskB
{
    public class MyReader
    {
        private TextReader instream;

        public int[] ReadIntArray()
        {
            string inp = instream.ReadLine().Trim();
            string[] spl = inp.Split(' ');

            int[] a = new int[spl.Length];
            for (int i = 0; i < a.Length; i++)
                a[i] = int.Parse(spl[i]);
            return a;
        }

        public long[] ReadLongArray()
        {
            string inp = instream.ReadLine().Trim();
            string[] spl = inp.Split(' ');

            long[] a = new long[spl.Length];
            for (int i = 0; i < a.Length; i++)
                a[i] = long.Parse(spl[i]);
            return a;
        }

        public double[] ReadDoubleArray()
        {
            string inp = instream.ReadLine().Trim();
            string[] spl = inp.Split(' ');

            double[] a = new double[spl.Length];

            System.Globalization.NumberFormatInfo nfi = new System.Globalization.NumberFormatInfo();
            nfi.NumberDecimalSeparator = ".";
            for (int i = 0; i < a.Length; i++)
                a[i] = double.Parse(spl[i], nfi);
            return a;
        }

        public int ReadInt()
        {
            return int.Parse(instream.ReadLine());
        }

        public long ReadLong()
        {
            return long.Parse(instream.ReadLine());
        }

        public void SetInStream(TextReader textReader)
        {
            this.instream = textReader;
        }

        internal string ReadLine()
        {
            return instream.ReadLine();
        }
    }

    static void Main(string[] args)
    {
        MyReader instream = new MyReader();
        instream.SetInStream(Console.In);

        TextWriter outstream = Console.Out;

        solve(instream, outstream);

    }

    private static void solve(MyReader instream, TextWriter outstream)
    {
        int[] ab = instream.ReadIntArray();

        int a = ab[0];
        int b = ab[1];

        int r1 = a * ((b-1) / 3+1);
        int r2 = ((a-1) / 3 + 1) * b;

        int r3 = a * b / 2 + ((a * b) % 2 == 0 ? 0 : 1);

        int res = Math.Max(Math.Max(r1, r2), r3);
        outstream.WriteLine(res);
    }

}