#include <bits/stdc++.h>
using namespace std;
double dis(double x1, double y1, double x2, double y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
int main() {
  double x1, y1, r1;
  double x2, y2, r2;
  double res, t, a, b;
  while (scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &r1, &x2, &y2, &r2) != EOF) {
    a = r1 > r2 ? r1 : r2;
    b = r1 < r2 ? r1 : r2;
    t = dis(x1, y1, x2, y2);
    if (t < a - b) {
      res = (a - t - b) / 2;
    } else if (t > r1 + r2) {
      res = (t - r1 - r2) / 2;
    } else
      res = 0;
    printf("%.7lf\n", res);
  }
  return 0;
}
