#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, sum = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> k;
    sum += (int)abs(k);
  }
  cout << sum << endl;
  return 0;
}
