#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x;
  cin >> n;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &x);
    if (x < 0)
      sum += -x;
    else
      sum += x;
  }
  cout << sum << endl;
}
