#include <bits/stdc++.h>
using namespace std;
long long int powmod(long long int base, long long int pow) {
  long long int res = 1;
  while (pow) {
    if (pow % 2 != 0) res = (res * base) % 1000000007;
    base = (base * base) % 1000000007;
    pow /= 2;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int sum = 0;
  int n;
  cin >> n;
  for (long long int i = 0; i < n; i++) {
    int x;
    cin >> x;
    if (x > 0)
      sum += x;
    else
      sum -= x;
  }
  cout << sum;
}
