#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b = 0, c = 0;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    int a;
    cin >> a;
    b += (a < 0) ? -a : a;
  }
  cout << b << endl;
  return 0;
}
