#include using namespace std; typedef long long ll; signed main(){ //cout << setprecision(12) ; ios::sync_with_stdio(false); cin.tie(0); ll x,y,z; cin>>x>>y>>z; ll ans=z; if(z>=x) ans--; if(z>=y) ans--; cout<