#include <bits/stdc++.h>
const double EPS = 1e-9;
using namespace std;
template <class T>
inline T gcd(T a, T b) {
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
template <class T>
inline T lcm(T a, T b) {
  return a / gcd(a, b) * b;
}
inline int nxt() {
  int wow;
  scanf("%d", &wow);
  return wow;
}
inline long long int lxt() {
  long long int wow;
  scanf("%lld", &wow);
  return wow;
}
inline double dxt() {
  double wow;
  scanf("%lf", &wow);
  return wow;
}
double dpp(double x1, double y1, double x2, double y2) {
  return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
}
int main() {
  double cx = dxt(), cy = dxt(), cr = dxt();
  double fx = dxt(), fy = dxt(), fr = dxt();
  double d = sqrt(dpp(cx, cy, fx, fy));
  double ans;
  if (cr + fr <= d)
    ans = d - (cr + fr);
  else
    ans = -d - min(cr, fr) + max(cr, fr);
  if (ans < 0) ans = 0;
  ans /= 2.0;
  printf("%0.8lf\n", ans);
  return 0;
}
