void main(){
  import std.stdio, std.string, std.conv, std.algorithm;
  import std.math;

  int n; rd(n);
  auto a=readln.split.to!(int[]);

  writeln(reduce!((r,e)=>(r+e.abs))(0, a));
}

void rd(T...)(ref T x){
  import std.stdio, std.string, std.conv;
  auto l=readln.split;
  assert(l.length==x.length);
  foreach(i, ref e; x){
    e=l[i].to!(typeof(e));
  }
}