int n, a[256] = {0}, i;

scanf("%d", &n);
for(i=0; n; i++, n/=10) a[i] = n % 10;