Question 22
When a positive integer $N$ is fed into a machine, the output is a number calculated according to the rule shown below.

For example, starting with an input of $N=7,$ the machine will output $3 \cdot 7 + 1 = 22.$ Then if the output is repeatedly inserted into the machine five more times, the final output is $26.$ $$
\begin{align*} &7 \to 22 \to 11 \to 34 \\ &\to 17 \to 52 \to 26 \end{align*}
$$ When the same $6$-step process is applied to a different starting value of $N,$ the final output is $1.$ What is the sum of all such integers $N?$ $$
\begin{align*} &N \to \underline{\phantom{00}} \to \underline{\phantom{00}} \to \underline{\phantom{00}}\\ &\to \underline{\phantom{00}} \to \underline{\phantom{00}} \to 1 \end{align*}
$$

For example, starting with an input of $N=7,$ the machine will output $3 \cdot 7 + 1 = 22.$ Then if the output is repeatedly inserted into the machine five more times, the final output is $26.$ $$
\begin{align*} &7 \to 22 \to 11 \to 34 \\ &\to 17 \to 52 \to 26 \end{align*}
$$ When the same $6$-step process is applied to a different starting value of $N,$ the final output is $1.$ What is the sum of all such integers $N?$ $$
\begin{align*} &N \to \underline{\phantom{00}} \to \underline{\phantom{00}} \to \underline{\phantom{00}}\\ &\to \underline{\phantom{00}} \to \underline{\phantom{00}} \to 1 \end{align*}
$$