#include <bits/stdc++.h>
using namespace std;
int main() {
  double eps = 0.0000001;
  double x1, y1, r1;
  double x2, y2, r2;
  cin >> x1 >> y1 >> r1;
  cin >> x2 >> y2 >> r2;
  double d = sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
  if (d > r1 + r2 + eps) {
    printf("%lf", (d - r1 - r2) / 2);
    return 0;
  } else {
    if (d < fabs(r1 - r2) + eps) {
      printf("%lf", (fabs(r1 - r2) - d) / 2);
    } else {
      cout << 0;
    }
    return 0;
  }
}
