using System; class yukicoder { static void Main(string[] args) { var r = new Reader(); var L = r.nextInt(); var K = r.nextInt(); var yu_mm = 0; for (var i = K; i < L; i += K ) { if (i >= L / 2 ) { break; } else { yu_mm += K; } } Console.WriteLine(yu_mm); } } class Reader { string[] s; int i; char[] cs = new char[] { ' ' }; public Reader() { s = new string[0]; i = 0; } public string next() { if ( i < s.Length ) return s[i++]; var input = Console.ReadLine(); while ( input == "" ) input = Console.ReadLine(); s = input.Split(cs, StringSplitOptions.RemoveEmptyEntries); i = 0; return next(); } public int nextInt() { return int.Parse(next()); } }