#include <bits/stdc++.h>
using namespace std;
const int maxint = -1u >> 1;
const double pi = 3.14159265358979323;
const double eps = 1e-8;
int dbcmp(double x, double y) {
  if (fabs(x - y) < eps) return 0;
  return x > y ? 1 : -1;
}
int main() {
  double x1, y1, r1, x2, y2, r2, l, x;
  scanf("%lf%lf%lf", &x1, &y1, &r1);
  scanf("%lf%lf%lf", &x2, &y2, &r2);
  l = sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
  if (dbcmp(l, r1 + r2) >= 0)
    x = (l - r1 - r2) / 2;
  else if (dbcmp(l, fabs(r1 - r2)) >= 0) {
    printf("0\n");
    return 0;
  } else {
    if (r1 > r2)
      x = (r1 - l - r2) / 2;
    else
      x = (r2 - l - r1) / 2;
  }
  printf("%.15f\n", x);
  return 0;
}
