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