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