#include <bits/stdc++.h>
using namespace std;
const int inf = 1.01e9;
const double eps = 1e-9;
int main() {
  int n;
  scanf("%d", &n);
  long long b = 0;
  long long c = 0;
  for (int i = 0; (i) < (n); ++i) {
    int x;
    scanf("%d", &x);
    if (x < 0)
      c += x;
    else
      b += x;
  }
  cout << b - c << endl;
  return 0;
}
