L,K = map(int,input().split()) k = K * 2 eat=K*(L//k) print(eat)