#include int main(void) { int aw,ab,bw,bb,c,d; scanf("%d%d%d%d%d%d",&aw,&ab,&bw,&bb,&c,&d); if(abd)aw+=d; else aw+=bw; printf("%d",aw); return 0; }