program criminala(input,output);
var
n,m,i,min,max:longint;
pp:array[0..50002,0..1]of longint;
begin
assign(input,'criminala.in');
reset(input);
assign(output,'criminala.out');
rewrite(output);
readln(n,m);
for i:=1 to m do
begin
read(min);
if min<0 then
inc(pp[-min,0])
else
inc(pp[min,1]);
end;
min:=0;
max:=0;
for i:=1 to n do
if pp[i,0]<pp[i,1] then
begin
min:=min+pp[i,0];
max:=max+pp[i,1];
end
else
begin
min:=min+pp[i,1];
max:=max+pp[i,0];
end;
writeln(max);
writeln(min);
close(input);
close(output);
end.