#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int sum = 0, sum1 = 0;
  int a;
  for (int i = 1; i <= n; i++) {
    cin >> a;
    if (a > 0)
      sum += a;
    else
      sum1 += a;
  }
  cout << sum - sum1;
}
