Maria is planning to buy notebooks and pens for her school supplies. She finds that each notebook costs $2 and each pen costs $1. Maria has a total of $10 to spend. If she buys $n$ notebooks and $p$ pens, which of the following equations represents the relationship between $n$ and $p$?
Write your answer in the form of a linear equation in $n$ and $p$.