/*
로그아웃 안한사람 sararyu07
#include<stdio.h>
int main()
{
int top=0, sum=0;
char str[100001]={};
scanf("%s",str);
for(int i=0; str[i]!=0; i++){
if(str[i]=='('){
if(str[i+1]==')'){
sum+=top;
}
else{
top++;
}
}
else if(str[i]==')'){
if(str[i-1]=='('){
continue;
}
else{
top--;
sum++;
}
}
}
printf("%d",sum);
return 0;
}
#include <stdio.h>
int top1=-1;
int top=-1;
int stack1[102]={};
int stack[102]={};
void push(int n)
{
if(top==102) return;
stack[++top]=n;
}
int pop()
{
return stack[top--];
}
void push1(int n)
{
if(top1==102) return;
stack1[++top1]=n;
}
int pop1()
{
return stack1[top1--];
}
int main()
{
char a[101]={},b[101]={};
int i,j,n,m,c=0,num,x,y;
scanf("%s",a);
n=strlen(a);
scanf("%s",b);
m=strlen(b);
for(i=n-1,j=m-1; i>=0||j>=0; i--,j--){
if(i>=0) x= a[i]-48;
else x=0;
if(j>=0) y=b[j]-48;
else y=0;
num=x+y+c;
c=num/10;
push1 (num%10);
}
if(c==1) push1(c);
while(top1!=-1){
printf("%d",pop1());
}
return 0;
}
*/