#include using namespace std; int profit(int b, int s, int c) { return -(c - b - s); } int main() { int t, b, s, c; cin >> t; for (int i = 0; i < t; i++){ cin >> b >> s >> c; cout << profit(b, s, c) << endl; } }