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