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