School concert#8810

School concert (Editorial)

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 a + b - c.

scanf("%lld %lld %lld", &a, &b, &c);
res = a + b - c;
printf("%lld\n", res);