#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<int> pos, neg;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x < 0) {
      neg.emplace_back(x);
    } else {
      pos.emplace_back(x);
    }
  }
  cout << accumulate(pos.begin(), pos.end(), 0) -
              accumulate(neg.begin(), neg.end(), 0);
}
