//na :cuixiaofei;
//da :08_04_23;
program gametk;
var
n,m :longint;
a :array[1..600,1..600] of longint;
procedure init;
var
r,t,i,j,he :longint;
f1,f2 :text;
begin
assign(f1,'gametk.in');
reset(f1);
assign(f2,'gametk.out');
rewrite(f2);
readln(f1,n,m,r,t);
he:=0;
for i:=1 to n do
for j:=1 to m do
begin
read(f1,a[i,j]);
he:=he+a[i,j];
end;
if r>m then
writeln(f2,he)
else
writeln(f2,he div 10*7);
close(f2);
close(f1);
end;
begin
init;
end.