#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[1006];
  int n;
  cin >> n;
  long long sum = 0, sum1 = 0;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    if (a[i] >= 0)
      sum = sum + a[i];
    else
      sum1 = sum1 + a[i];
  }
  cout << (sum + abs(sum1)) << endl;
}
