#include <bits/stdc++.h>
using namespace std;
int main() {
  double x1, y1, r1, x2, y2, r2;
  scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &r1, &x2, &y2, &r2);
  double dis = sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2)));
  if (dis > r1 + r2)
    printf("%.15lf", (dis - r1 - r2) / 2);
  else if (dis <= r2 + r1 && dis >= abs(r2 - r1))
    printf("0.000000000000000");
  else
    printf("%.15lf", (abs(r2 - r1) - dis) / 2);
}
