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