This isn't the fastest way to do it....but let's see if we can discover what the answer might be.....let's assume a number can't start with zero....I'm also assuming that the 2 and the 1 can be separated......this may or may not be the correct assumption....
Let's suppose that the 2 and 1 came first.....then we have 10 ways to fill the third posiition and 10 ways to fill the last position = 100
And if the 1 is shifted to the right one position we again have 100 possibilities - 10 ways to fill the second position and 10 ways to fill the 4th position - and if it's the last number that's 100 more.
So, when the 2 occupies the first position, we have 300 possibilities
Now, assuming that a number can't start with zero, let the 2 and 1 occupy the second and third positions. Then we have 9 x 10 = 90 ways to fill the other two positions - 9 ways for the first position times 10 ways for the last position. And this is true again if the 2 occupies the second position and the 1 occupies the last position.
And if the 2 and 1 occupy the last two positions, we again have 9 x 10 = 90 more possibilities.
So the total number would be 3x100 + 3x90 = 570
