using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp3
{
    internal class Program
    {
        static void Main()
        {
            string[] s = Console.ReadLine().Split(' ');
            long n = long.Parse(s[0]);
            long m = long.Parse(s[1]);
            for(long i = 0; i<n; i++)
            {
                s = Console.ReadLine().Split(' ');
            }
            Console.WriteLine(m*n+12);
        }
    }
}