A pyramid of non-negative integers is constructed as follows:

1. The first row consists of only $0$.
2. The second row consists of $1$ and $1$.
3. The $n^{th}$ row (for $n > 2$) is an array of $n$ integers, where the leftmost and rightmost elements are equal to $n - 1$, and the interior numbers are equal to the sum of two adjacent numbers from the $(n - 1)^{th}$ row.

Let $S_n$ be the sum of numbers in the $n^{th}$ row. Determine the remainder when dividing $S_{2018}$ by $2018$.

Let's think step by step and output the final answer within \boxed{}.
user