#include <iostream>
#include <cmath>
#define N 100
using namespace std;
int main() {
int rect[3][4];
int field[2*N][2*N];
int count = 0;
for(int i = 0;i<2*N;i++)for(int k = 0;k<2*N;k++)field[i][k]=0;
for(int i = 0;i<3;i++){
for(int k = 0;k<4;k++){
cin>>rect[i][k];
rect[i][k]=rect[i][k]+N;
}
}
for(int k = 0;k<3;k++){
for(int i = min(rect[k][0],rect[k][2]);i<max(rect[k][0],rect[k][2]);i++){
for(int j = min(rect[k][1],rect[k][3]);j<max(rect[k][1],rect[k][3]);j++){
field[i][j]=1;
}
}
}
for(int i = 0;i<2*N;i++){
for(int k = 0;k<2*N;k++){
if(field[i][k]==1)count++;
}
}
cout<<count;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CiNkZWZpbmUgTiAxMDAKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewoJaW50IHJlY3RbM11bNF07CglpbnQgZmllbGRbMipOXVsyKk5dOwoJaW50IGNvdW50ID0gMDsKCWZvcihpbnQgaSA9IDA7aTwyKk47aSsrKWZvcihpbnQgayA9IDA7azwyKk47aysrKWZpZWxkW2ldW2tdPTA7Cglmb3IoaW50IGkgPSAwO2k8MztpKyspewoJCWZvcihpbnQgayA9IDA7azw0O2srKyl7CgkJCWNpbj4+cmVjdFtpXVtrXTsKCQkJcmVjdFtpXVtrXT1yZWN0W2ldW2tdK047CgkJfQoJfQoJZm9yKGludCBrID0gMDtrPDM7aysrKXsKCQlmb3IoaW50IGkgPSBtaW4ocmVjdFtrXVswXSxyZWN0W2tdWzJdKTtpPG1heChyZWN0W2tdWzBdLHJlY3Rba11bMl0pO2krKyl7CgkJCWZvcihpbnQgaiA9IG1pbihyZWN0W2tdWzFdLHJlY3Rba11bM10pO2o8bWF4KHJlY3Rba11bMV0scmVjdFtrXVszXSk7aisrKXsKCQkJCWZpZWxkW2ldW2pdPTE7CgkJCX0KCQl9Cgl9Cglmb3IoaW50IGkgPSAwO2k8MipOO2krKyl7CgkJZm9yKGludCBrID0gMDtrPDIqTjtrKyspewoJCQlpZihmaWVsZFtpXVtrXT09MSljb3VudCsrOwoJCX0KCX0KCWNvdXQ8PGNvdW50Owp9