#include <bits/stdc++.h>
int main() {
  int n, m, i, j = 0, s = 0;
  scanf("%d", &n);
  int a[n];
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    if (a[i] >= 0)
      j += a[i];
    else
      s += a[i];
  }
  printf("%d", j - s);
  return 0;
}
