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

namespace test
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] str = Console.ReadLine().Split(' ');
            decimal N, X;
            N = decimal.Parse(str[0]);
            X = decimal.Parse(str[1]);
            Console.WriteLine("{0}", N * 2 + X);
        }
    }
}