#include <bits/stdc++.h>
const double eps = 1e-9;
const int int_inf = 1 << 31 - 1;
const long long i64_inf = 1ll << 63 - 1;
const double pi = acos(-1.0);
using namespace std;
int x[2];
int y[2];
int r[2];
int main() {
  for (int i = 0; i < (int)2; i++) cin >> x[i] >> y[i] >> r[i];
  if (r[0] < r[1]) {
    swap(x[0], x[1]);
    swap(y[0], y[1]);
    swap(r[0], r[1]);
  }
  if ((x[0] - x[1]) * (x[0] - x[1]) + (y[0] - y[1]) * (y[0] - y[1]) <=
      (r[0]) * (r[0]) - 2 * r[0] * r[1] + (r[1]) * (r[1])) {
    double d = (x[0] - x[1]) * (x[0] - x[1]) + (y[0] - y[1]) * (y[0] - y[1]);
    d = sqrt(d);
    d = r[0] - d;
    d -= r[1];
    d *= 0.5;
    printf("%.20lf\n", d);
    return 0;
  }
  if ((x[0] - x[1]) * (x[0] - x[1]) + (y[0] - y[1]) * (y[0] - y[1]) <=
      (r[0]) * (r[0]) + 2 * r[0] * r[1] + (r[1]) * (r[1])) {
    puts("0.000000000");
    return 0;
  }
  double d = (x[0] - x[1]) * (x[0] - x[1]) + (y[0] - y[1]) * (y[0] - y[1]);
  d = sqrt(d);
  d -= r[0] + r[1];
  d *= 0.5;
  printf("%.20lf\n", d);
  return 0;
}
