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