Score: 400 points
AtCoder Inc. has decided to lock the door of its office with a 3-digit PIN code.
The company has an N-digit lucky number, S. Takahashi, the president, will erase N-3 digits from S and concatenate the remaining 3 digits without changing the order to set the PIN code.
How many different PIN codes can he set this way?
Both the lucky number and the PIN code may begin with a 0.
Input is given from Standard Input in the following format:
N S
Print the number of different PIN codes Takahashi can set.
4 0224
3
Takahashi has the following options:
224
.024
.024
.022
.Thus, he can set three different PIN codes: 022
, 024
, and 224
.
6 123123
17
19 3141592653589793238
329