3. Let the integer $N>1, 1=d_{1}<d_{2}<\cdots<d_{s}=N$ be all the positive divisors of $N$. It is known that
$$
\left(d_{1}, d_{2}\right)+\left(d_{2}, d_{3}\right)+\cdots+\left(d_{s-1}, d_{s}\right)=N-2 \text {. }
$$

Find all possible values of $N$.
3. $N=3$.

Let $r_{i}=d_{i+1}-d_{i}-\left(d_{i+1}, d_{i}\right)(1 \leqslant i \leqslant s-1)$.
Then $r_{i} \geqslant 0,\left(d_{i+1}, d_{i}\right) \mid r_{i}$.
By the condition,
$$
\sum_{i=1}^{s-1} r_{i}=\sum_{i=1}^{s-1}\left(d_{i+1}-d_{i}\right)-\sum_{i=1}^{s-1}\left(d_{i+1}, d_{i}\right)=1 \text {. }
$$

Therefore, there exists $k(1 \leqslant k \leqslant s-1)$, such that
$$
r_{k}=1, r_{i}=0(i \neq k) .
$$

By $\left(d_{k+1}, d_{k}\right) \mid r_{k}, r_{k}=1$
$$
\Rightarrow\left(d_{k+1}, d_{k}\right)=1, d_{k+1}-d_{k}=2
$$
$\Rightarrow d_{k} 、 d_{k+1}$ are odd numbers.
Let $m=s-k$. Then,
$$
\begin{array}{l}
d_{m}=\frac{N}{d_{k+1}}, d_{m+1}=\frac{N}{d_{k}} . \\
\text { Then }\left(d_{m}, d_{m+1}\right)=\frac{N}{\left[d_{k}, d_{k+1}\right]}=\frac{N\left(d_{k}, d_{k+1}\right)}{d_{k} d_{k+1}} \\
0$.
Thus, $m=k, s=2 k, N=d_{k} d_{k+1}$ is an odd number.
Hence $\left(d_{s-1}, d_{s}\right) \leqslant d_{s-1} \leqslant \frac{N}{3}$,
$$
\begin{array}{l}
1 \geqslant r_{s-1}=d_{s}-d_{s-1}-\left(d_{s-1}, d_{s}\right) \\
\geqslant N-\frac{N}{3}-\frac{N}{3}=\frac{N}{3} .
\end{array}
$$

Therefore, $N=3$.
On the other hand, it is clear that $N=3$ satisfies the condition.