import strutils, sequtils, math let xy, x2y2 = stdin.readLine.split.map parseInt (x, y) = (xy[0], xy[1]) (x2, y2) = (x2y2[0], x2y2[1]) var offset = 0 if x == y and x2 == y2: if x.sgn == x2.sgn and y.sgn == y2.sgn: if x > x2: offset += 1 echo max(x, y) + offset