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