#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, sum = 0;
  vector<int> a, b;
  cin >> n;
  int nums[n];
  for (int i = 0; i < n; i++) {
    cin >> nums[i];
    if (nums[i] < 0)
      b.push_back(nums[i]);
    else
      a.push_back(nums[i]);
  }
  vector<int>::iterator iter;
  for (iter = a.begin(); iter != a.end(); ++iter) sum += *iter;
  for (iter = b.begin(); iter != b.end(); ++iter) sum -= *iter;
  cout << sum;
  return 0;
}
