#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, n, r = 0;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> j;
    if (j >= 0) r = r + j;
    if (j < 0) r = r - j;
  }
  cout << r;
  return 0;
}
