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