#include <bits/stdc++.h>
using namespace std;
int n, a[1111], sm, sm1, mx;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    sm1 += abs(a[i]);
  }
  cout << sm1;
  return 0;
}
