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