#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  int N;
  ll count = 0;
  vector<int> data(N);
  for (int i = 0; i < N; i++) {
    cin >> data.at(i);
    count += data.at(i);
  }
  for (int i = 0; i < N; i++) {
    cout << count - data.at(i) << endl;
  }
}
