#include
#define MAX 1000005
int a[MAX],ext[MAX];
int main(int argc, char* argv[])
{
int n,i,tmp;
while(scanf("%d",&n)!=EOF)
{
a[0]=0;
ext[0]=0;
for(i=1;i
#include
#define MAX 1000005
int a[MAX],ext[MAX];
int main(int argc, char* argv[])
{
int n,i,tmp;
while(scanf("%d",&n)!=EOF)
{
a[0]=0;
ext[0]=0;
for(i=1;i