/*
#include<stdio.h>
#include<string.h>
int stack[200]={};
int top=-1;
void push(data)
{
top++;
stack[top]=data;
}
void pop()
{
if (top!=-1){
top--;
}
}
int main()
{
char str[200]={};
int sum=0, i, c, c2;
gets (str);
for (i=0; str[i]!=NULL; i++){
if (str[i]>47&&str[i]<58){
sum=0;
for (;;i++){
if(str[i]<48||str[i]>57){
break;
}
sum=sum*10+(str[i]-'0');
}
push(sum);
}
if (str[i]=='+'||str[i]=='*'||str[i]=='-'){
c=stack[top];
pop();
c2=stack[top];
pop();
switch(str[i]){
case '+':
push(c+c2);
break;
case '-':
push(c2-c);
break;
case '*':
push(c*c2);
break;
}
}
}
printf("%d", stack[0]);
}
*/
#include<stdio.h>
#include<string.h>
int stack[200]={};
int stack2[200]={};
int stack3[200]={};
int top=-1;
int top2=-1;
int top3=-1;
void push(int data)
{
top++;
stack[top]=data;
}
void push2(int data)
{
top2++;
stack2[top2]=data;
}
void push3(int data)
{
top3++;
stack3[top3]=data;
}
int pop()
{
if (top==-1){
return 0;
}
return stack[top--];
}
int pop2()
{
if (top2==-1){
return 0;
}
return stack2[top2--];
}
int pop3()
{
if (top3==-1){
return 0;
}
return stack3[top3--];
}
int main()
{
char str[101]={};
char str2[101]={};
int i, c=0, n=0, sum=0;
gets (str);
gets (str2);
if (990 1100)
for (i=0; i<100; i++){
if (str[i]!=NULL){
push(str[i]-'0');
}
if (str2[i]!=NULL){
push2(str2[i]-'0');
}
}
for (;;){
if (n!=0){
stack[top]--;
n=0;
}
if(top2==-1) //뺄 수가 더이상 없을때
{
while(top!=-1){
push3(pop());
}
break;
}
if (stack[top]<stack2[top2]){
n=10;
}
c=pop()-pop2()+n;
push3(c);
}
while (top3!=-1){
printf ("%d", pop3());
}
return 0;
}