#include <bits/stdc++.h>
const long long mod = 1000000007;
const long long Inf = 1e9;
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  double x1, x2, y1, y2, r1, r2;
  cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
  if (r1 < r2) {
    swap(x1, x2);
    swap(y1, y2);
    swap(r1, r2);
  }
  double d = sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
  if (d >= r1 + r2) {
    cout << setprecision(9) << fixed << (d - r1 - r2) / 2.0;
    return 0;
  }
  if (d + r2 < r1) {
    cout << setprecision(9) << fixed << (r1 - r2 - d) / 2.0;
  }
  if (d < r1 + r2) {
    cout << setprecision(9) << fixed << 0;
    return 0;
  }
  return 0;
}
