#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, pos = 0, neg = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int temp;
    cin >> temp;
    if (temp > 0)
      pos += temp;
    else
      neg += temp;
  }
  cout << (pos - neg);
}
