#include <bits/stdc++.h>
using namespace std;
int n, a[103];
int main() {
  int i, ss, sd;
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + n + 1);
  ss = sd = 0;
  for (i = 1; a[i] <= 0 && i <= n; i++) ss += a[i];
  for (; i <= n; i++) sd += a[i];
  cout << sd - ss;
  return 0;
}
