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