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

namespace Algorithm
{
    class Program
    {
        static void Main(string[] args)
        {
            var line = Console.ReadLine().Split().Select(z => int.Parse(z)).ToArray();
            int a = line[0], p = line[1];

            p += a * 3;

            Console.WriteLine($"{p/2}");
        }
    }
}