int main()
{
    int i = 0;
    int count = 0;
    for (i = 9; i <= 2019; i++)
    {
        int t = i;
        while (t)
        {
            if (t % 10 == 9)
            {
                count++;
                break;
            }
            t = t / 10;
        }
    }
    printf("%d\n", count);
    return 0;
}