#include<bits/stdc++.h>
#include<vector>
#include<iostream>
#include<queue>
#include<map>
using namespace std;
const int maxn=1e5+10;
typedef long long ll;
double a[7];
int main()
{
for(int i=1;i<=6;i++)cin>>a[i];
double are=(a[2]*2.0+a[1]+a[3])*((a[3]+a[4]));
are-=(a[1]*a[1]+a[3]*a[3]+a[4]*a[4]+a[6]*a[6])/2.0;
ll ans=are;
cout<<ans<<endl;
}