/* 10 1 20 2 30 3 50 14 60 15 70 16 80 17 90 18 100 19 200 38 300 ...*/// include file#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std;// typedeftypedef __int64 LL;// #define read freopen("in.txt","r",stdin)#define write freopen("out.txt","w",stdout)#define Z(a,b) ((a)<<(b))#define Y(a,b) ((a)>>(b))const double eps = 1e-6;const double INFf = 1e100;const int INFi = 1000000000;const LL INFll = (LL)1<<62;const double Pi = acos(-1.0);template inline T sqr(T a){return a*a;}template inline T TMAX(T x,T y){ if(x>y) return x; return y;}template inline T TMIN(T x,T y){ if(x inline T MMAX(T x,T y,T z){ return TMAX(TMAX(x,y),z);}template inline T MMIN(T x,T y,T z){ return TMIN(TMIN(x,y),z);}template inline void SWAP(T &x,T &y){ T t = x; x = y; y = t;}// code beginint DP[10][10];int N;int main(){ read; write; for(int i=0;i<=9;i++) DP[1][i] = i>=4?1:0; for(int i=2;i<=9;i++) { DP[i][1] = DP[i-1][9]+DP[i-1][1]; for(int j=2;j<=9;) { if(j==4) { j++; DP[i][j] = DP[i][j-2]+(int)pow(10.0,i-1)+DP[i][1]; j++; } else { DP[i][j] = DP[i][j-1]+DP[i][1]; j++; } } } while(scanf("%d",&N)&&N) { int ans = 0,t=N; for(int i=1;;i++) { ans += DP[i][N%10]; N/=10; if(N==0) break; } printf("%d: %d\n",t,t-ans); } return 0;}