#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int *a = new int[n];
  int b = 0, c = 0;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    if (a[i] <= 0)
      c += a[i];
    else
      b += a[i];
  }
  int D = b - c;
  cout << D;
  return 0;
}
