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