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