import strutils, math proc nextString: string = result = "" while not endOfFile stdin: let nextChar = readChar stdin case nextChar of '\r': discard of "\n"[0], ' ': break else: add result, nextChar proc main: void = let r, d = parseFloat nextString() writeLine stdout, pow((d ^ 2 - r ^ 2), 0.5) when isMainModule: main()