def main(): X, Y, Z = map(int, input().split()) print(Z-(Z >= Y)-(Z >= X)) if __name__ == "__main__": main()