int sum(int[] a)
{
  int s = 0;
  for(int i = 0; i < a.length; i = i + 1)
  {
    s = s + a[i];
  }
  return s;
}