#include <bits/stdc++.h>
using namespace std;
int x[2], y[2], r[2];
int main() {
  for (int i = 0; i < 2; ++i) scanf("%d %d %d", &x[i], &y[i], &r[i]);
  double l1 = hypot(x[1] - x[0], y[1] - y[0]);
  if (l1 >= r[1] + r[0])
    printf("%.15lf", (l1 - (r[0] + r[1])) / 2.0);
  else if (l1 <= fabs(r[1] - r[0]))
    printf("%.15lf", (fabs(r[1] - r[0]) - l1) / 2.0);
  else
    printf("%.15lf", 0.0);
  return 0;
}
