'use strict'
const Main=input=>{
    input=input.split(" ");
    
    if(input[1]!=0){
        if(input[2]<input[0]){
            console.log(input[2]);
        }else{
            console.log(input[0]);
        }
    }else{
        console.log(0);
    }
}

Main(require("fs").readFileSync("/dev/stdin","utf8"));