#include <bits/stdc++.h>
using namespace std;
const int N = 5010;
double x, y, r;
double x2, y2, r2;
int main() {
  ios::sync_with_stdio(0);
  cin >> x >> y >> r;
  cin >> x2 >> y2 >> r2;
  double l = sqrt((x - x2) * (x - x2) + (y - y2) * (y - y2));
  l -= r + r2;
  if (l < 0 && (l + r + r2) + min(r, r2) < max(r, r2))
    l = max(r2, r) - min(r, r2) - (l + r + r2);
  if (l < 0) l = 0;
  cout << fixed << setprecision(6) << l / 2 << '\n';
}
