#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1E9 + 7;
const long long N = 2E5 + 6;
const long long inf = 1E15;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  if (fopen("inp.txt", "r")) {
    freopen("inp.txt", "r", stdin);
    freopen("outp.txt", "w", stdout);
  }
  long long n, i, p, s1 = 0, s2 = 0;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> p;
    if (p < 0)
      s2 += p;
    else
      s1 += p;
  }
  cout << s1 - s2;
  return 0;
}
