#include <bits/stdc++.h>
using namespace std;
int main() {
  double x1, y1, r1, x2, y2, r2;
  double dis, res;
  scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &r1, &x2, &y2, &r2);
  dis = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
  if (dis > r1 + r2)
    res = (dis - r1 - r2) / 2.0;
  else if (dis >= fabs(r1 - r2))
    res = 0;
  else
    res = (fabs(r1 - r2) - dis) / 2.0;
  printf("%.16lf\n", res);
  return 0;
}
