#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, i, j, k = 0, x = 0, y = 0, z = 0;
  cin >> n;
  long long int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] >= 0)
      x += a[i];
    else
      y += a[i];
  }
  cout << x - y;
}
