#include <bits/stdc++.h>
using namespace std;
const long double EPS = 1e-8;
const long double PI = 3.1415926535897932384626433832795;
const long double E = 2.7182818284;
const int INF = 1000000000;
int main(void) {
  double x1, y1, r1, x2, y2, r2, r3;
  cin >> x1 >> y1 >> r1 >> x2 >> y2 >> r2;
  double d1 = x1 - x2, d2 = y1 - y2;
  double s = sqrt(d1 * d1 + d2 * d2);
  if (s <= r1 || s <= r2) {
    if (r2 >= s + r1) {
      printf("%.8lf", (r2 - s - r1) / 2);
      return 0;
    }
    if (r1 >= s + r2) {
      printf("%.8lf", (r1 - s - r2) / 2);
      return 0;
    }
  }
  if (s <= r1 + r2) {
    printf("0");
    return 0;
  }
  s -= r1 + r2;
  printf("%.8lf", s / 2);
  return 0;
}
