import strscans let (_, x, y, z) = stdin.readAll.scanTuple"$i $i $i" var result = z if z >= x: dec result if z >= y: dec result echo result