typedef struct node
{
int num[N];
int top;
}stak;
int main()
{
stak *p;
p->top=-1;
int x;
int k=-1;
while(scanf("%d",&x),x!=0)
{
p->top++;
p->num[p->top]=x;
k++;
}
int *q;
*q=p->num[p->top];(看 这 里)!!
p->top--;
printf("%d",p->num[p->top]);
return 0;
}