#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, n, m, x, y, z, i, j, k, l;
  int sum = 0, sum1 = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> t;
    if (t > 0) {
      sum = sum + t;
    } else {
      sum1 = sum1 + t;
    }
  }
  m = sum - sum1;
  cout << m << endl;
  return 0;
}
