#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int x, S = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &x);
    S += abs(x);
  }
  printf("%d", S);
  return 0;
}
