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