#include <bits/stdc++.h>
using namespace std;
long double dist(long double x1, long double y1, long double x2,
                 long double y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}
long long gcd(long long a, long long b) {
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
long long nok(long long a, long long b) { return (a * b) / gcd(a, b); }
int main() {
  ios::sync_with_stdio(false);
  long double x1, y1, a;
  cin >> x1 >> y1 >> a;
  long double x2, y2, b;
  cin >> x2 >> y2 >> b;
  long double r1 = min(a, b), r2 = max(a, b);
  long double s = dist(x1, y1, x2, y2);
  cout << fixed << setprecision(9);
  if (s - r1 - r2 >= 0) {
    cout << (s - r1 - r2) / 2;
  } else {
    if (r1 + s <= r2) {
      cout << (r2 - r1 - s) / 2;
    } else {
      cout << 0;
    }
  }
}
