If we want to calculate $a\times b$ and $a$ and $b$ are close to a round number $N$, then we can write:
$$a\times b = (N+a')\times(N + b') = N^2 + N(a'+b') + a'\times b' = N\times(a +b')+a'\times b'$$
In this case, taking $N = 20$ yields:
$$18\times 17 = 20\times(18-3) + 6 = 306$$
More examples:
$$984\times 993 = 1000\times(984-7) + 16\times 7 = 977112$$
$$\begin{split}9876\times 9913 &= 10,000\times(9876-87)+ 124\times 87 \\&=97,890,000+100\times(124 - 13) - 24\times 13\\
&=97,901,100 - 20\times(24-7)+4\times 7\\
&=97,901,100 - 340 +28\\
& = 97,900,788
\end{split}$$