func test(input: String) -> Int? {
    let inputs = str.split(separator: " ")
    guard inputs.count == 2 else {
        return nil
    }
    let input0 = Int(inputs[0])
    let input1 = Int(inputs[1])
    guard let a = input0, let b = input1 else {
        return nil
    }
    let result: Int
    if a >= b {
        result=a
    } else {
        result=a-1
    }
    return result
}