#include <bits/stdc++.h>
using namespace std;
int main() {
  double d;
  int x[2], y[2], r[2];
  cin >> x[0] >> y[0] >> r[0];
  cin >> x[1] >> y[1] >> r[1];
  d = (sqrt(pow(x[0] - x[1], 2) + pow(y[0] - y[1], 2)));
  if (d < r[1] + r[0]) {
    if (d + r[1] < r[0])
      d = r[0] - d - r[1];
    else if (d + r[0] < r[1])
      d = r[1] - d - r[0];
    else
      d = 0;
  } else
    d = d - r[0] - r[1];
  cout << fixed << setprecision(7) << d / 2;
  return 0;
}
