The New York Public Library requires patrons to choose a 4-digit Personal Identification Number (PIN) to access its online system. (Leading zeros are allowed.) The PIN is not allowed to contain either of the following two forbidden patterns:

1. A digit that is repeated 3 or more times in a row. For example, $0001$ and $5555$ are not PINs, but $0010$ is a PIN.
2. A pair of digits that is duplicated. For example, $1212$ and $6363$ are not PINs, but $1221$ and $6633$ are PINs.

How many distinct possible PINs are there?

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