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