#include <bits/stdc++.h>
using namespace std;
int a[200005];
int main() {
  int n, sum = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 1; i <= n; i++) {
    sum = sum + a[i];
  }
  for (int i = 1; i <= n; i++) {
    printf("%d\n", sum - a[i]);
  }
  return 0;
}
