#include <bits/stdc++.h>
using namespace std;
int main() {
  double x1, x2, y1, y2, r1, r2, r;
  while (cin >> x1 >> y1 >> r1) {
    cin >> x2 >> y2 >> r2;
    double d =
        sqrt(((x1 - x2) * (x1 - x2) * 1.0) + ((y1 - y2) * (y1 - y2) * 1.0));
    r = (d - r1 - r2) * 0.5;
    if (r < 0) {
      if (max(r1, r2) <= d + min(r1, r2)) {
        r = 0;
      } else {
        r = (max(r1, r2) - min(r1, r2) - d) * 0.5;
      }
    }
    printf("%.15lf\n", r);
  }
  return 0;
}
