fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. void solve() {
  5. int b, h, c;
  6. cin >> b >> h >> c;
  7. cout << min(b / 2, h + c) << '\n';
  8. }
  9.  
  10. int main() {
  11. solve();
  12. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
0