#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const double EPS = 1e-9;
const int N = (1 << 14);
const long long OO = (long long)1 * 1e18;
const long long mod = 1e9 + 7;
int main() {
  int n, t, s = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> t;
    s += abs(t);
  }
  cout << s;
  return 0;
}
