a d e f b g h n m p ; N=10 (all distinct)
Substring of length $0\rightarrow\;$1(i.e. null string)
Substrings of length $1\rightarrow\;N$
Substrings of length $2\rightarrow\;N-1$
Substrings of length $3\rightarrow\;N-2$
•
•
Substrings of length $N-1\rightarrow\;2$
Substrings of length $N\rightarrow\;1$
Total no. of substrings $=1+N+(N-1)+(N-2)+\cdots+2+1$
$=1+\frac{N(N+1)}{2}$
Here N=10, so total substrings = 1+55 = 56.