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