#include <bits/stdc++.h>
using namespace std;
int main() {
  double x1, x2, y1, y2, r1, r2;
  scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &r1, &x2, &y2, &r2);
  double rast = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
  if (rast < max(r1, r2)) {
    double p1 = max(r1, r2), p2 = min(r1, r2);
    double p4 = (p1 - rast - p2);
    p4 /= 2.0;
    if (p4 < 0)
      printf("0.000000");
    else
      printf("%.6lf", p4);
    return 0;
  }
  double p4 = rast - r1 - r2;
  p4 /= 2.0;
  if (p4 < 0)
    printf("0.000000");
  else
    printf("%.6lf", p4);
  return 0;
}
