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