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