#include #define rep(i,n) for(int i=0;i> x >> y >> z; ll ans = z; if(x<=z){ans--;} if(y!=x&&y<=z){ans--;} cout << ans << endl; }