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