#include <bits/stdc++.h>
using namespace std;
double x[7], y[7], r[7];
int main() {
  for (int i = 1; i <= 2; i++) scanf("%lf %lf %lf", &x[i], &y[i], &r[i]);
  double d =
      sqrt((x[1] - x[2]) * (x[1] - x[2]) + (y[1] - y[2]) * (y[1] - y[2]));
  double ans = d > r[1] + r[2]        ? d - r[1] - r[2]
               : d < abs(r[1] - r[2]) ? abs(r[1] - r[2]) - d
                                      : 0;
  printf("%.12lf\n", ans / 2);
  return 0;
}
