/*
#include <stdio.h>
#include <string.h>
#include <windows.h>
#include <math.h>
#define MAX 1000
int numstack[1000];
int stack[1000];
char charstack[1000];
char equation[1000];
int numtop=0;
int chartop=0;
int top=0;
void convert();
void calculator();
void convert()
{
int i;
for(i=0;i<strlen(equation);i++)
{
//printf("------------------------------------------\n");
if(equation[i]>=48&&equation[i]<=57)
{
int temp=0;
while(equation[i]>=48&&equation[i]<=57)
{
stack[top++]=equation[i]-'0';
i++;
}
int cnt=0;
while(top>0)
{
temp+=(stack[top-1])*pow(10.0, cnt);
top--;
}
numstack[numtop++]=temp;
}
if(equation[i]<48||equation[i]>57)
{
if(equation[i]==')'||equation[i]=='}'||equation[i]==']')
calculator();
else
charstack[chartop++]=equation[i];
}
}
calculator();
}
void calculator()//괄호 계산은 1번 , 그냥 계산은 0번
{
while(chartop>0)
{
int x, y;
int temp;
x=numstack[numtop-2];
y=numstack[numtop-1];
if(charstack[chartop-1]=='('||charstack[chartop-1]=='{'||charstack[chartop-1]=='[')
{
chartop--;
return;
}
if(charstack[chartop-1]=='+')
{
temp=x+y;
numtop=numtop-2;
numstack[numtop++]=temp;
}
else if(charstack[chartop-1]=='-')
{
temp=x-y;
numtop=numtop-2;
numstack[numtop++]=temp;
}
else if(charstack[chartop-1]=='*')
{
temp=x*y;
numtop=numtop-2;
numstack[numtop++]=temp;
}
else if(charstack[chartop-1]=='/')
{
temp=x/y;
numtop=numtop-2;
numstack[numtop++]=temp;
}
chartop--;
}
}
int main()
{
scanf("%s", equation);
// printf("%s\n", equation);
convert();
printf("%d\n", numstack[numtop-1]);
return 0;
}
*/
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
#include <string.h>
typedef struct node
{
int index;
int data;
node *rlink;
node *llink;
}node;
node *start;
node *current;
int nodes=1;
void MAXheap(int num)
{
current->data=num;
compare();
node *newnode;
newnode=(node*)malloc(sizeof(node));
newnode->index=nodes++;
if(current->llink==NULL)
current->llink=newnode;
else
current->rlink=newnode;
current=newnode;
}
int main()
{
int num;
start = (*node)malloc(sizeof(node));
start->index=nodes++;
start->rlink=NULL;
start->llink=NULL;
current=start;
scanf("%d", &num);
}