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