#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int sumPos = 0, sumNeg = 0;
  while (n > 0) {
    int temp;
    cin >> temp;
    if (temp > 0)
      sumPos += temp;
    else
      sumNeg += temp;
    n--;
  }
  cout << sumPos - sumNeg;
  return 0;
}
