#include <bits/stdc++.h>
using namespace std;
int X1, X2, Y1, Y2, R1, R2;
double dis;
const double eps = 1e-8;
int main() {
  scanf("%d %d %d", &X1, &Y1, &R1);
  scanf("%d %d %d", &X2, &Y2, &R2);
  dis = sqrt((X1 - X2) * (X1 - X2) + (Y1 - Y2) * (Y1 - Y2));
  if (dis > R1 + R2) {
    dis = (dis - (double)(R1 + R2)) / 2.0;
    printf("%.15f\n", dis);
  } else {
    dis = (double)(max(R1, R2) - min(R1, R2) - dis) / 2.0;
    dis = (double)max((double)dis, 0.0);
    printf("%.15f\n", dis);
  }
  return 0;
}
