#include <bits/stdc++.h>
double xa, ya, ra;
double x2, y2, r2;
double d, dx, dy, ans;
void suru() {
  scanf("%lf %lf %lf %lf %lf %lf", &xa, &ya, &ra, &x2, &y2, &r2);
  if (ra > r2) {
    std::swap(ra, r2);
    std::swap(xa, x2);
    std::swap(ya, y2);
  }
  dx = abs(xa - x2);
  dy = abs(ya - y2);
  d = sqrt(dx * dx + dy * dy);
}
void truli() {
  if (d >= ra + r2) {
    ans = (d - ra - r2) / 2;
    return;
  }
  if (d + ra <= r2) {
    ans = (r2 - ra - d) / 2;
    return;
  }
  ans = 0;
}
void sutru() { printf("%.16lf\n", ans); }
int main() {
  suru();
  truli();
  sutru();
  return 0;
}
