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