I have a variable receiving 3 types of results: 4-digit number, 3-digit number, and NA

For example

4412
4564
334
NA
7677

What I want is to get the first 3 digit as below

441
456
334
.
767

Could you please let me know how to make it? I think of generate a new variable but I am not sure how to make it.

Warm regards.