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