#include<stdio.h> int main() { int n,m=1,q,sum=0; scanf("%d",&n); while(n>m) {q=n/m; if(q%2==1) sum+=m; m*=10; } printf("%d",sum); }