#include <bits/stdc++.h>
using namespace std;
int main() {
  double x1, x2, y1, y2, r1, r2, d, a;
  cin >> x1 >> y1 >> r1;
  cin >> x2 >> y2 >> r2;
  d = sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
  if (d > r2 + r1)
    a = d - r1 - r2;
  else if (d < abs(r1 - r2))
    a = abs(r1 - r2) - d;
  cout << fixed << setprecision(9) << a / 2.0;
}
