#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int b = 0, c = 0;
  cin >> n;
  int a;
  for (int i = 0; i < n; i++) {
    cin >> a;
    if (a > 0) b += a;
    if (a < 0) c += a;
  }
  cout << b - c;
  return 0;
}
