#include <bits/stdc++.h>
using namespace std;
struct pi {
  int x, y;
};
double dist(pi a, pi b) {
  return (double)sqrt(
      (double)((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)));
}
int main() {
  pi a, b;
  int r1, r2;
  cin >> a.x >> a.y >> r1 >> b.x >> b.y >> r2;
  if (dist(a, b) > r1 + r2) {
    cout << fixed << setprecision(15) << max(0.0, dist(a, b) - r1 - r2) / 2;
  } else {
    cout << fixed << setprecision(15)
         << max(0.0, (abs(r1 - r2) - dist(a, b)) / 2);
  }
}
