#include <bits/stdc++.h>
using namespace std;
long long a[200], b, c, sum = 0, n;
int main() {
  long long i, j, k;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    sum += a[i];
  }
  sort(a, a + n);
  b = 0;
  for (i = n - 1; i >= 0; i--) {
    if (a[i] < 0) break;
    b += a[i];
  }
  c = sum - b;
  cout << b - c << endl;
  return 0;
}
