#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
const double EPS = 1e-9;
double SQR(double x) { return x * x; }
bool zero(double x) { return abs(x) < EPS; }
int main() {
  double x1, y1, r1, x2, y2, r2;
  cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
  double dis = sqrt(SQR(x1 - x2) + SQR(y1 - y2));
  double r = 0;
  if (dis > r1 + r2 || zero(dis - r1 - r2)) {
    r = (dis - r1 - r2) / 2;
  } else if (dis + r1 < r2 || zero(r2 - dis - r1)) {
    r = (r2 - dis - r1) / 2;
  } else if (dis + r2 < r1 || zero(r1 - dis - r2)) {
    r = (r1 - dis - r2) / 2;
  } else {
    r = 0;
  }
  printf("%0.7lf\n", r);
  return 0;
}
