using System;
class Program
{
  static void Main(string[] args){
    string s=Console.ReadLine();
    string[] math=s.Split(' ');
    int piece=0;
    piece+=int.Parse(math[0])*3;
    piece+=int.Parse(math[1]);
    Console.WriteLine(piece);
  }
}