import strutils, math proc nextString: string = result = "" while not endOfFile stdin: let c = readChar stdin if c == ' ' or c == "\n"[0]: return elif c != '\r': add result, c proc nextInt: int = parseInt nextString() let minR, maxR = nextInt() var ans = 0 for r in minR .. maxR: var cnt = 0 for x in 0 .. int.high: if x * x >= r: break let Y = (r - x * x).toFloat if Y.sqrt.floor == Y.sqrt: cnt += 1 ans = max(ans,cnt) echo ans * 4