#include<cstdio> int main() { int a[10],len,sum; for(int i=1;i<=6;i++) scanf("%d",&a[i]); len=a[1]+a[2]+a[6]; sum=len*len-a[2]*a[2]-(len-a[2]-a[3])*(len-a[2]-a[3])-a[6]*a[6]; printf("%d\n",sum); return 0; }