#include using namespace std; using ll = long long; using pii = pair; using vi = vector; using vl = vector; #define rep(i, n) for(ll i = 0;i < n;i++) #define all(i) i.begin(), i.end() template bool cmax(T& a, U b) { if (a bool cmin(T& a, U b) { if (a>b) {a = b; return true;} else return false; } int main() { cin.tie(0); ios::sync_with_stdio(false); uint_fast64_t x, y, z; cin >> x >> y >> z; if (x <= z) z--; if (y <= z) z--; cout << z << endl; }