Rank and quotients

Let R be an integral domain, M an R-module, and N a submodule of M. Prove that the rank of M is the sum of the ranks of N and M/N.

(You may assume M has finite rank.)