fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int n, a, b, c, x, y, z;
  7. cin >> n >> a >> b >> c >> x >> y >> z;
  8. if (x + y + z == 0) {
  9. cout << 0;
  10. }
  11. else {
  12. cout << (x + y + z) - (a + b + c - n);
  13. }
  14. return 0;
  15. }
Success #stdin #stdout 0s 4448KB
stdin
Standard input is empty
stdout
582571356