package m.shin; import java.util.Scanner; public class Con857 { public static void main(String[] args) { Scanner s = new Scanner(System.in); long X = s.nextLong() , Y = s.nextLong() , Z = s.nextLong(); s.close(); if(Y <= Z){ Z--; } if(X <= Z){ Z--; } System.out.println(Z); } }