#include<stdio.h>
int main()
{
    int n;
    scanf("%d",&n);
    int isNegative=0;
    if(n<0)
    {
        isNegative=1;
        n=n;
    }
    char str[20];
    sprintf(str,"%d"n);
    for(int i=0;str[i] !='\0';i++)
    {
         if(str[i] == '0')
         {
             str[i]='1';
         }
    }
    int resuit;
    scanf(str,"%d",&result);
    if(isNegative)
    {
        result=-result;
    }
    printf("%d\n",result);
    return 0;
}