#include <bits/stdc++.h>
using namespace std;
void past_code();
string s, t;
int c = 0;
long double sum = 0;
void gg(int a, int n, double p) {
  if (a == t.length()) {
    if (n == c) sum = sum + p;
  } else if (t[a] == '+')
    return gg(a + 1, n + 1, p);
  else if (t[a] == '-')
    gg(a + 1, n - 1, p);
  else {
    gg(a + 1, n - 1, p / 2);
    gg(a + 1, n + 1, p / 2);
  }
}
int main() {
  int x, y, sum = 0, sum1 = 0;
  cin >> x;
  for (int i = 0; i < x; i++) {
    cin >> y;
    if (y >= 0)
      sum = sum + y;
    else
      sum1 = sum1 + y;
  }
  cout << sum - sum1 << endl;
  return 0;
}
