let n = readLine()!.split(separator: " ").map{Int($0)!} var z = n[2] if n[0] <= n[2]{ z -= 1 } if n[1] <= n[2]{ z -= 1 } print(z)