#include <bits/stdc++.h>
using namespace std;
signed main() {
  double x1, y1, r1, x2, y2, r2;
  cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
  double dist = sqrt(abs(x2 - x1) * abs(x2 - x1) + abs(y2 - y1) * abs(y2 - y1));
  if (dist + min(r1, r2) == max(r1, r2)) {
    cout << 0;
  } else if (dist + min(r1, r2) < max(r1, r2)) {
    cout << fixed << setprecision(15)
         << max(0.0, (max(r2, r1) - dist - min(r1, r2)) / 2);
  } else {
    cout << fixed << setprecision(15) << max(0.0, (dist - r1 - r2) / 2);
  }
  return 0;
}
