#include <bits/stdc++.h>
using namespace std;
double a1, b1, r1;
double a2, b2, r2;
void rezolva() {
  double d = sqrt((a1 - a2) * (a1 - a2) + (b1 - b2) * (b1 - b2));
  if (d + min(r1, r2) <= max(r1, r2)) {
    if (r1 > r2) {
      cout << fixed << setprecision(15) << (r1 - d - r2) / 2;
      return;
    }
    cout << fixed << setprecision(15) << (r2 - d - r1) / 2;
    return;
  }
  if (r1 + r2 >= d) {
    cout << 0;
    return;
  }
  d = (d - r1 - r2) / 2;
  cout << fixed << setprecision(15) << d << '\n';
}
int main() {
  cin >> a1 >> b1 >> r1;
  cin >> a2 >> b2 >> r2;
  rezolva();
  return 0;
}
