#include <bits/stdc++.h>
using namespace std;
int main() {
  int aux, a, p = 0, n = 0;
  cin >> a;
  for (int i = 0; i < a; i++) {
    cin >> aux;
    if (aux > 0)
      p += aux;
    else
      n += aux;
  }
  printf("%d\n", p - n);
  return 0;
}
