#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long inf = 1000000000;
int main() {
  int n;
  cin >> n;
  int A[n];
  int sum1 = 0;
  int sum2 = 0;
  for (int i = 0; i < n; i++) {
    cin >> A[i];
    if (A[i] < 0) {
      sum2 += A[i];
    } else {
      sum1 += A[i];
    }
  }
  cout << sum1 - sum2 << endl;
  return 0;
}
