#include <fstream>

using namespace std;

int main () {
	ifstream in;
	in.open("input.txt");

	ofstream out;
	out.open("output.txt");
	
	int n, sum=0;
	in >> n;
	for(int i = 0 ; i < n; i++ ) {
		int k;
		in >> k;
		sum += k;
	}

	out<< sum/3;


	in.close();
	out.close();
}