[tex]\overline{ab} \ \textless \ 40, a \neq 0, b=8\\
10a+8\ \textless \ 40\\
10a\ \textless \ 32\\
a\ \textless \ 3\ intregi\ \frac{2}{10}\\
a\in N^*\Rightarrow a\in \{1,2,3\}\\
Deci:\ \overline{ab} \in \{18,28,38\}\\
S=18+28+38\\
\boxed{\boxed{S=84}}[/tex]