#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, x1, y1, x2, y2, R, r;
  while (cin >> x1 >> y1 >> r) {
    cin >> x2 >> y2 >> R;
    double len;
    double dis = (x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1);
    if (dis >= (R + r) * (R + r)) {
      len = sqrt(dis) - (R + r);
    } else if (dis >= (R - r) * (R - r)) {
      len = 0.0;
    } else {
      len = fabs(R - r) - sqrt(dis);
    }
    double ans = len / 2 + (1e-9);
    printf("%.6lf\n", ans);
  }
  return 0;
}
