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