#include <bits/stdc++.h>
using namespace std;
int SUM(int a[], int n);
int sum1(int b[], int n);
int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    int a[200], b[200], i;
    for (i = 0; i < n; i++) cin >> a[i];
    int j, k = 0;
    for (j = 0; j < n; j++) {
      if (a[j] > 0) {
        b[k] = a[j];
        k++;
      }
    }
    int jishu;
    jishu = 2 * sum1(b, k) - SUM(a, n);
    cout << jishu;
  }
  return 0;
}
int SUM(int a[], int n) {
  int i, sum = 0;
  for (i = 0; i < n; i++) sum += a[i];
  return sum;
}
int sum1(int b[], int n) {
  int i, sum = 0;
  for (i = 0; i < n; i++) sum += b[i];
  return sum;
}
