#include <bits/stdc++.h>
using namespace std;
int main() {
  signed int x1, y1, x2, y2;
  unsigned int r1, r2;
  cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
  double distCenters =
      sqrt((double)((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2)));
  unsigned int maxRadui, minRadui;
  if (r2 > r1) {
    maxRadui = r2;
    minRadui = r1;
  } else {
    maxRadui = r1;
    minRadui = r2;
  }
  if (distCenters > r2 + r1)
    distCenters -= r2 + r1;
  else if (distCenters <= maxRadui - minRadui)
    distCenters = maxRadui - distCenters - minRadui;
  else {
    cout << "0.000000000000000" << endl;
    return 0;
  }
  printf("%0.15f\n", fabs(distCenters / 2.0));
  return 0;
}
