Lattice codes are applied to the two-user Gaussian multiple access channel (MAC) combined with a modified compute-and-forward transmitting scheme. It is shown that non-corner points on the boundary of the capacity region can be achieved by decoding two integer sums of the codewords, which can be viewed as a generalization of the well-known successive cancellation decoding. A similar idea is then applied to the so-called dirty MAC where two interfering signals are known non-causally to the two transmitters in a distributed fashion. Our scheme recovers previously known results and gives new achievable rate regions. The proposed scheme can be extended to the case with more than two users.