#include <bits/stdc++.h>
using namespace std;
int a[10000];
int main(int argc, char const *argv[]) {
  int n;
  cin >> n;
  int sum1 = 0;
  int sum2 = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] >= 0)
      sum1 += a[i];
    else
      sum2 += a[i];
  }
  cout << sum1 - sum2 << endl;
  return 0;
}
