x,y,z = map(int,input().split()) print(z - (x <= z) - (x != y <= z))