#include <bits/stdc++.h>
int main(void) {
  double x1, y1, r1;
  double x2, y2, r2;
  scanf("%lf%lf%lf", &x1, &y1, &r1);
  scanf("%lf%lf%lf", &x2, &y2, &r2);
  double dis;
  dis = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);
  dis = sqrt(dis);
  if (dis >= r1 + r2) {
    dis -= r1 + r2;
    printf("%.10f\n", dis / 2);
  } else if (dis + r1 <= r2) {
    printf("%.10f\n", (r2 - r1 - dis) / 2);
  } else if (dis + r2 <= r1) {
    printf("%.10f\n", (r1 - r2 - dis) / 2);
  } else {
    printf("0.0000000\n");
  }
  return 0;
}
