using System;

class plogram
{
    static void Main()
    {

        string apple = Console.ReadLine();
        string[] array = apple.Split(',');

        int piese = int.Parse(array[1]);
        piese += int.Parse(array[0]) * 3;

        Console.WriteLine(piese/2);
    }
}
