#include <bits/stdc++.h>
using namespace std;
double distance(double x1, double y1, double x2, double y2) {
  return sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2) * 1.0);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int T;
  T = 1;
  while (T--) {
    double x1;
    double x2;
    double y1;
    double y2;
    double r1;
    double r2;
    cin >> x1 >> y1 >> r1;
    cin >> x2 >> y2 >> r2;
    double d = distance(x1, y1, x2, y2);
    double ans = 0;
    if (d >= r1 + r2) {
      ans = d - r1 - r2;
    } else if (max(r1, r2) >= min(r1, r2) + d) {
      ans = max(r1, r2) - d - min(r1, r2);
    } else {
      ans = 0;
    }
    cout << fixed << setprecision(6) << ans / 2 << "\n";
  }
}
