#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned tst{};
  cin >> tst;
  long long total{};
  while (tst--) {
    long long num{};
    cin >> num;
    if (num < 0) num *= -1;
    total += num;
  }
  cout << total << endl;
  return 0;
}
