#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), ios::sync_with_stdio(0), cin.tie(0),
      cout.tie(0);
  int n;
  cin >> n;
  long long sum = 0, sum1 = 0, sum2 = 0;
  int x[n];
  bool flagneg = 0, flagpos = 0;
  for (int c = 0; c < n; c++) {
    cin >> x[c];
    sum += abs(x[c]);
  }
  cout << sum << "\n";
  return 0;
}
