#include <bits/stdc++.h>
using namespace std;
int main() {
  double A, B, C;
  scanf("%lf%lf%lf", &A, &B, &C);
  double D, E, F;
  scanf("%lf%lf%lf", &D, &E, &F);
  double d = sqrt((A - D) * (A - D) + (B - E) * (B - E));
  if (d >= C + F)
    printf("%0.15lf\n", max(0.0, (d - C - F) / 2.0));
  else if (F - C - d >= 0)
    printf("%0.15lf\n", max(0.0, (F - C - d) / 2.0));
  else if (C - F - d >= 0)
    printf("%0.15lf\n", max(0.0, (C - F - d) / 2.0));
  else
    printf("%0.15lf\n", 0.0);
}
