using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace tes { class contest { static void Main(string[] args) { var num = Console.ReadLine().Split(' ').Select(int.Parse).ToArray(); var dp = new bool[num[0]]; dp[1] = true; int count = 0; int plate = num[0]; plate -= 1; if(plate%2 != 0) { count = plate / num[1]; } else { count = (plate / num[1]) + (plate-plate/num[1])/num[1]; } Console.WriteLine(count); } } }