#include<stdio.h>
int main()
{
    int ab,a,c,d,k=0,t=0,p=1,e;
    scanf("%d",&a);
    ab=a;
    while(1)
    {
        if(a/10<1)
        {
            break;
        }
        else
        {
            a=a/10;
             t++;
        }
    }
    for(k=1;k<=t;k++)
    {
        p=p*10;
        e=p-1;
        c=e-p/10+1;
        d=d+c*k;
    }
    c=ab-p+1;
    d=d+c*k;
    printf("%d",d);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: