{ NOTE: it is recommended to use this even if you don't understand the following code }

const
    MAXN = 500;
    MAXM = 500;

var
    C, M, N, i, j : LongInt;
    G             : Array[0..MAXM-1] of Array[0..MAXN-1] of Char;

begin
{
    uncomment the two following lines if you want to read/write from files
    assign(input,  'input.txt');  reset(input);
    assign(output, 'output.txt'); rewrite(output);
}

    ReadLn(N, M);

    for j:=0 to N-1 do begin
        for i:=0 to M-1 do
            Read(G[j][i]);
        ReadLn();
    end;

    C := 0;

    { INSERT YOUR CODE HERE }


    WriteLn(C);

end.
