processors=5
model=erew
def a[10]
if (pid==1)
{	
	input a$	
}
isync
call workoutval
call addit
println sum%

procedure workoutval
{
	theaddr%=pid*2
	theaddrtwo%=theaddr%
	theaddrtwo%--
}

procedure addit
{
	sumone%=a[theaddr%]
	sumtwo%=a[theaddrtwo%]
	sum%=sumone%+sumtwo%
}