#include <bits/stdc++.h>
using namespace std;
int main(int argc, char** argv) {
  cout.precision(10);
  int x1, y1, r1, x2, y2, r2;
  cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
  int dist = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);
  if (dist >= (r1 + r2) * (r1 + r2))
    cout << (sqrt(dist) - r1 - r2 + 0.0) / 2;
  else if (dist >= (r1 - r2) * (r1 - r2))
    cout << "0";
  else
    cout << (max(r1, r2) - sqrt(dist) - min(r1, r2) + 0.0) / 2;
  return 0;
}
