#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
bool eq(double a, double b) { return abs(a - b) < eps; }
bool le(double a, double b) { return a < b + eps; }
int main() {
  int x1, y1, r1;
  scanf("%d%d%d", &x1, &y1, &r1);
  int x2, y2, r2;
  scanf("%d%d%d", &x2, &y2, &r2);
  if (r1 > r2) {
    swap(x1, x2);
    swap(y1, y2);
    swap(r1, r2);
  }
  double dc = sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
  if (le(dc + r1, r2)) {
    printf("%.11f", (double)(r2 - r1 - dc) / 2);
    return 0;
  }
  if (le(dc, r1 + r2)) {
    printf("%.11f", (double)(0) / 2);
    return 0;
  }
  printf("%.11f", (double)(dc - r1 - r2) / 2);
  return 0;
  return 0;
}
