#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long a = 0, b = 0;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    if (x < 0)
      b += x;
    else
      a += x;
  }
  cout << a - b;
}
