#include <bits/stdc++.h>
using namespace std;
double getdis(double x1, double y1, double x2, double y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
int main() {
  double x1, y1, r1, x2, y2, r2;
  while (~scanf("%lf%lf%lf", &x1, &y1, &r1)) {
    scanf("%lf%lf%lf", &x2, &y2, &r2);
    double ans = getdis(x1, y1, x2, y2);
    if (ans >= fabs(r1 - r2) && ans <= (r1 + r2))
      printf("%lf\n", 0);
    else if (ans > (r1 + r2))
      printf("%lf\n", (ans - r1 - r2) / 2);
    else {
      if (r1 > r2) {
        double tt;
        tt = r1;
        r1 = r2;
        r2 = tt;
      }
      double m = r2 - (ans + r1);
      double n = r2 - (r1 - ans);
      double z = min(m, n);
      printf("%lf\n", z / 2);
    }
  }
  return 0;
}
