<?php
function doSquare($n, $m, $a)
{
$square = $n * $m;
$countHeight = ceil($n / $a); $countLength = ceil($m / $a); $count = $countHeight * $countLength;
return $count . "\n";
}
echo doSquare(25, 14, 6);
echo doSquare(8, 8, 7);
PD9waHAKCm1iX2ludGVybmFsX2VuY29kaW5nKCJVVEYtOCIpOwpmdW5jdGlvbiBkb1NxdWFyZSgkbiwgJG0sICRhKQp7CiAgICAkc3F1YXJlICAgICAgPSAkbiAqICRtOwogICAgJGNvdW50SGVpZ2h0ID0gY2VpbCgkbiAvICRhKTsKICAgICRjb3VudExlbmd0aCA9IGNlaWwoJG0gLyAkYSk7CiAgICAkY291bnQgICAgICAgPSAkY291bnRIZWlnaHQgKiAkY291bnRMZW5ndGg7CiAgICByZXR1cm4gJGNvdW50IC4gIlxuIjsKfQplY2hvIGRvU3F1YXJlKDI1LCAxNCwgNik7CmVjaG8gZG9TcXVhcmUoOCwgOCwgNyk7