#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vb = vector<bool>;
using pii = pair<int, int>;
using mii = map<int, int>;
const long long M = (long long)1e9 + 7;
const long long inf = (long long)1e15;
const double eps = 1e-8;
const long long upper = 1e5 + 10;
long long entry;
long long ans = 0;
signed main() {
  long long begtime = clock();
  ;
  cin.tie(0), cout.tie(0), ios_base::sync_with_stdio(false);
  long long n;
  cin >> n;
  for (long long i = 0; i < n; ++i) {
    cin >> entry;
    ans += abs(entry);
  }
  cout << ans;
  long long endtime = clock();
  cerr << '\n'
       << "Time elapsed: " << (endtime - begtime) * 1000 / CLOCKS_PER_SEC
       << " ms";
  return 0;
}
