#include <bits/stdc++.h>
using namespace std;
int n, B = 0, C = 0, arr[100 + 5];
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> arr[i];
  sort(arr, arr + n);
  for (int i = 0; i < n; ++i) {
    if (arr[i] < 0)
      C += arr[i];
    else
      B += arr[i];
  }
  cout << B - C << endl;
}
