Let $S(M)$ denote the sum of the digits of a positive integer $M$ written in base $10$. Let $N$ be the smallest positive integer such that $S(N) = 2013$. What is the value of $S(5N + 2013)$?
1. **Finding the smallest \( N \) such that \( S(N) = 2013 \):**
   - The sum of the digits of \( N \) is 2013.
   - To minimize \( N \), we should use the largest possible digits (i.e., 9) as much as possible.
   - If \( N \) consists of \( k \) digits, and each digit is 9, then the sum of the digits is \( 9k \).
   - We need \( 9k = 2013 \), so \( k = \frac{2013}{9} = 223 \).
   - Therefore, \( N \) should have 223 digits, all being 9.
   - However, to minimize \( N \), we can use one digit less than 9 and adjust the first digit accordingly.
   - The smallest \( N \) is \( 6 \) followed by 223 nines, which can be written as \( 7 \times 10^{223} - 1 \).

2. **Calculating \( 5N + 2013 \):**
   - Given \( N = 7 \times 10^{223} - 1 \), we need to find \( 5N + 2013 \).
   - \( 5N = 5 \times (7 \times 10^{223} - 1) = 35 \times 10^{223} - 5 \).
   - Therefore, \( 5N + 2013 = 35 \times 10^{223} - 5 + 2013 = 35 \times 10^{223} + 2008 \).

3. **Finding \( S(5N + 2013) \):**
   - We need to find the sum of the digits of \( 35 \times 10^{223} + 2008 \).
   - \( 35 \times 10^{223} \) is a number with 35 followed by 223 zeros.
   - Adding 2008 to this number affects only the last four digits.
   - So, \( 35 \times 10^{223} + 2008 \) is a number with 35 followed by 223 zeros, and then 2008.
   - The sum of the digits of this number is \( 3 + 5 + 2 + 0 + 0 + 8 = 18 \).

The final answer is \( \boxed{18} \).