Algorithm Analysis
Let's use the inclusion-exclusion principle. The number of attendees at the concert equals .
Since , , ≤ , we should use the long long
type.
Implementation of the algorithm
Read the input data. Calculate and print the answer .
scanf("%lld %lld %lld", &a, &b, &c); res = a + b - c; printf("%lld\n", res);