// #pragma comment(linker, "/STACK:1024000000,1024000000")
#include <iostream>
#include <cstdio>
#include <cstring>
#include <sstream>
#include <string>
#include <algorithm>
#include <list>
#include <map>
#include <vector>
#include <queue>
#include <stack>
#include <cmath>
#include <cstdlib>
// #include <conio.h>
using namespace std;
#define clc(a,b) memset(a,b,sizeof(a))
#define inf 0x3f3f3f3f
#define lson l,mid,rt<<1
#define rson mid+1,r,rt<<1|1
const int N = ;
const int MOD = 1e9+;
#define LL long long
#define mi() (l+r)>>1
double const pi = acos(-);
// inline int r() {
// int x=0,f=1;char ch=getchar();
// while(ch>'9'||ch<'0') {if(ch=='-') f=-1;ch=getchar();}
// while(ch>='0'&&ch<='9') { x=x*10+ch-'0';ch=getchar();}return x*f;
// }
int n;
double hashh[N<<];
double sum[N<<];
int color[N<<];
struct Edge{
double x1,x2,y;
int flag;
bool operator < (const Edge &a) const{
return y<a.y;
}
}e[N<<];
int b_s(double x){
int l=,r=*n;
int mid;
while(l<=r){
mid=(l+r)>>;
if(hashh[mid]==x) return mid;
else if(hashh[mid]<x) l=mid+;
else r=mid-;
}
}
void pushdown(int rt,int l,int r){
if(color[rt]) sum[rt]=hashh[r+]-hashh[l];
else if(l==r) sum[rt]=;
else sum[rt]=sum[rt<<]+sum[rt<<|];
}
void update(int l,int r,int rt,int x,int y,int f){
if(x==l&&y==r){
color[rt]+=f;
pushdown(rt,l,r);
return;
}
int mid=mi();
if(y<=mid) update(l,mid,rt<<,x,y,f);
else if(x>mid) update(mid+,r,rt<<|,x,y,f);
else {
update(l,mid,rt<<,x,mid,f);
update(mid+,r,rt<<|,mid+,y,f);
}
pushdown(rt,l,r);
}
int main(){
// int n;
while(scanf("%d",&n)){
if(n==)
break;
clc(color,);
clc(sum,);
double x1,x2,y1,y2;
for(int i=;i<=n;i++){
scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2);
e[i*-].x1=e[i*].x1=x1;
e[i*-].x2=e[i*].x2=x2;
e[i*-].y=y1;e[i*].y=y2;
e[i*-].flag=;e[i*].flag=-;
hashh[i*-]=x1;hashh[i*]=x2;
}
sort(e+,e++*n);
sort(hashh+,hashh++*n);
double ans=;
for(int i=;i<=*n;i++){
int l=b_s(e[i].x1),r=b_s(e[i].x2)-;
// cout<<"l:"<<l<<" "<<"r:"<<r<<endl;
if(l<=r) update(,*n,,l,r,e[i].flag);
// cout<<"sum[1]"<<sum[1]<<endl;
ans+=sum[]*(e[i+].y-e[i].y);
}
printf("%.2f\n",ans);
}
return ;
}