#include <bits/stdc++.h>
using namespace std;
double dist(double a, double b, double c, double d) {
  return sqrt((a - c) * (a - c) + (b - d) * (b - d));
}
int main() {
  double x, y, r, a, b, c, d;
  cin >> x >> y >> r >> a >> b >> c;
  d = dist(x, y, a, b);
  if (d - r - c > 0)
    printf("%.9lf\n", (d - r - c) / 2);
  else {
    if (d >= abs(r - c) && d <= r + c)
      printf("0.000000000000\n");
    else {
      if (r > c)
        printf("%.9lf\n", (r - (d + c)) / 2);
      else
        printf("%.9lf\n", (c - (d + r)) / 2);
    }
  }
  return 0;
}
