#include <bits/stdc++.h>
using namespace std;
int main() {
  double dist;
  long long a1, a2, b1, b2, c1, c2;
  cin >> a1 >> b1 >> c1;
  cin >> a2 >> b2 >> c2;
  dist = sqrt(((b2 - b1) * 1.0) * ((b2 - b1) * 1.0) +
              ((a2 - a1) * 1.0 * ((a2 - a1) * 1.0)));
  if (dist >= c1 + c2)
    dist -= (c1 + c2);
  else {
    if (((a1 - c1) < a2 - c2 && (a1 + c1) > a2 + c2 && (b1 - c1) < b2 - c2 &&
         (b1 + c1) > b2 + c2) ||
        ((a1 - c1) > a2 - c2 && (a1 + c1) < a2 + c2 && (b1 - c1) > b2 - c2 &&
         (b1 + c1) < b2 + c2)) {
      dist = abs(c1 - c2) - dist;
    } else
      dist = 0.0;
  }
  dist /= 2.0;
  printf("%.15lf\n", dist);
  return 0;
}
