#include <bits/stdc++.h>
using namespace std;
int x, y, r, x2, y2, r2;
int main() {
  cin >> x >> y >> r;
  cin >> x2 >> y2 >> r2;
  int maxr = max(r, r2);
  int minr = min(r, r2);
  double d = sqrt((1.0 * x2 - x) * (x2 - x) + (y2 - y) * (y2 - y));
  if (maxr - minr >= d)
    cout << setprecision(18) << fixed << (1.0 * maxr - d - minr) / 2;
  if (r + r2 >= d) return cout << 0, 0;
  cout << setprecision(18) << fixed << (1.0 * d - 1.0 * r - 1.0 * r2) / 2;
  return 0;
}
