import strutils, sequtils var L, K, yu: int (L, K) = stdin.readLine.split.map(parseInt) while true: let next_L = L - 2 * K if next_L <= 0: break L = next_L yu += K echo yu