#include <stdio.h>
#include <stdlib.h>

int main(void)
{
	int i;
	int str[200000];
	int count = 0;
	int k = 0;
	long long sum = 0;


	scanf("%d", &i);
	for (k = 0; k < i; k++)
	{
		scanf("%d", &str[k]);
	}

	count = i / 2;
	i--;
	while (count > 0)
	{
		sum += str[i];
		i -= 2;
		count -=1;
	}
	printf("%lld\n", sum);
	return (0);
}