Problem

Source: Bulgaria 1990 P1

Tags: combinatorics



Consider the number obtained by writing the numbers $1,2,\ldots,1990$ one after another. In this number every digit on an even position is omitted; in the so obtained number, every digit on an odd position is omitted; then in the new number every digit on an even position is omitted, and so on. What will be the last remaining digit?