#include <bits/stdc++.h>
using namespace std;
long double x1, yy1, r1, x2, y2, r2;
void input() { cin >> x1 >> yy1 >> r1 >> x2 >> y2 >> r2; }
void solve() {
  long double d = sqrt((x1 - x2) * (x1 - x2) + (yy1 - y2) * (yy1 - y2));
  if (d >= r1 + r2)
    cout << (d - r1 - r2) / 2.0;
  else if (d >= max(r1, r2) - min(r1, r2))
    cout << 0;
  else
    cout << (max(r1, r2) - d - min(r1, r2)) / 2.0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.precision(20);
  long long t;
  t = 1;
  while (t--) {
    input();
    solve();
  }
  cin.get();
  return 0;
}
