#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, s_min = 0, s_max = 0, s = 0;
  int a[100];
  cin >> N;
  for (int i = 0; i < N; i++) cin >> a[i];
  for (int i = 0; i < N; i++) {
    if (a[i] < 0)
      s_min += a[i];
    else
      s_max += a[i];
  }
  cout << (s_max - s_min);
  return 0;
}
