#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-7;
double dist(int x1, int y1, int x2, int y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
struct circle {
  int x, y, r;
  circle() {}
  friend istream &operator>>(istream &in, circle &c) {
    in >> c.x >> c.y >> c.r;
    return in;
  }
};
int main() {
  circle c1, c2;
  cin >> c1 >> c2;
  if (c1.r < c2.r) swap(c1, c2);
  double d = dist(c1.x, c1.y, c2.x, c2.y);
  double crt1 = d - (c1.r + c2.r), crt2 = c1.r - c2.r - d;
  if (crt1 > eps)
    printf("%.10f\n", crt1 / 2);
  else if (crt2 > eps)
    printf("%.10f\n", crt2 / 2);
  else
    printf("0\n");
}
