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