#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(false);
  int neg = 0, pos = 0;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x < 0)
      neg += x;
    else
      pos += x;
  }
  cout << pos - neg << '\n';
  return 0;
}
