// PascalABC.NET
begin
var m := ReadInteger('m =');
var K := MatrRandom(m, m, -99, 99);
K.Println;
var b := new integer[m * (m - 1) div 2];
var l := 0;
for var i := 0 to m - 2 do
for var j := i + 1 to m - 1 do
begin
b[l] := K[i, j];
Inc(l)
end;
b.Println.Sum.Print;
end.