#include<stdio.h>
#include<stdlib.h>
inr main(){
    int n;
    scanf("%d", &n);
    if( n==0){
        printf("1\n");
    }else{
        int temp = abs(n);
        int modified_n = 0;
        int power_of_10 = 1;
        while(temp > 0){
            int digit = temp % 10;
            if(digit == 0){
                digit = 1;
            }
            modified_n += digit * power_of_10;
            power_of_10 *= 10;
            temp /= 10;
        }
        if(n < 0){
            printf("-");
        }
        printf("%d\n", modified_n);
    }
    return 0;
}