#include<bits/stdc++.h>
using namespace std;
int n,t,c,e;
int x,y,z;
int d,f,g;
int main()
{
	freopen("club.in","r",stdin);
	freopen("club.out","w",stdout);
	cin>>n;
	cin>>x>>y>>z;
	cin>>d>>f>>g; 
		  if(1+1<=n/2)
		  c=y+d;
	cout<<c<<endl;
	fclose(stdin);
	fclose(stdout);
	return 0;
}
