#include <bits/stdc++.h>
using namespace std;
double x[2], y[2], r[2];
void swap(double &a, double &b) {
  double temp = a;
  a = b;
  b = temp;
}
void readInput() {
  for (int i = 0; i < 2; i++) cin >> x[i] >> y[i] >> r[i];
  if (r[0] < r[1]) swap(r[0], r[1]);
  double dx = x[0] - x[1];
  double dy = y[0] - y[1];
  double dist = sqrt(dx * dx + dy * dy);
  if (r[0] + r[1] < dist) {
    dist -= (double)(r[0] + r[1]);
    printf("%.10llf", dist / 2.0);
  } else if (dist + r[1] < r[0]) {
    printf("%.10llf", (r[0] - dist - r[1]) / 2.0);
  } else
    printf("0");
}
int main() {
  readInput();
  return 0;
}
