#include <bits/stdc++.h>
using namespace std;
const int N = 1e6;
long long infLL = 1e18;
int inf = 1e9;
int main() {
  ios_base::sync_with_stdio(false);
  int n;
  cin >> n;
  int res = 0;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    res += abs(x);
  }
  cout << res << "\n";
}
