print(math.min(io.read("*n","*n")))