M * n logSmith