import strutils, math var w, d = stdin.readLine.parseInt while d > 1: let y = w / d ^ 2 w -= y.int d -= 1 echo w