How can i re-write this haskell function complexity : <pre><code>c:: Integer -&gt; Integer
c n | n &lt; 3 = n + 100
    | otherwise = c (n-2) + c (n-3) + c (n-2)
</code></pre>

<p>Complexity of c in this form is exponential. Rewrite function c so that it's complexity is linear.
c x should terminate if 1000 &lt; x 100000.</p>
