let inpt = readLine()!.split(separator: " ").map{ Int($0)! } let mustGet = inpt[0] let itemCount = inpt[1] var items = [Int]() for _ in 0..= itemCount { break } let temp = abs(items[i + mustGet - 1] - items[i]) + min(abs(items[i + mustGet - 1]), abs(items[i])) ans = min(ans,temp) } print(ans)