Let $a, b, c, d$ be natural numbers such that $a + b + c + d = 2018$. Find the minimum value of the expression:
$$E = (a-b)^2 + 2(a-c)^2 + 3(a-d)^2 + 4(b-c)^2 + 5(b-d)^2 + 6(c-d)^2.$$

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