#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int ar[n];
  int cnt = 0, cnt2 = 0;
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
    if (ar[i] > 0)
      cnt += ar[i];
    else
      cnt2 += ar[i];
  }
  cout << cnt - cnt2;
  return 0;
}
