What is the sum of the smallest and second-smallest positive integers $a$ satisfying the congruence $$27a\equiv 17 \pmod{40}~?$$

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