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