#include <bits/stdc++.h>
using namespace std;
int main() {
  long long x1, x2, y1, y2, r1, r2;
  cin >> x1 >> y1 >> r1;
  cin >> x2 >> y2 >> r2;
  double dist = sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2)));
  if (dist + r1 < r2 + 1e-7) {
    printf("%.10lf\n", 0.5 * (r2 - dist - r1));
    return 0;
  } else if (dist + r2 < r1 + 1e-7) {
    printf("%.10lf\n", 0.5 * (r1 - dist - r2));
    return 0;
  } else if (dist < r1 + r2 + 1e-7) {
    printf("%.10lf\n", 0);
    return 0;
  }
  printf("%.10lf\n", 0.5 * (dist - r1 - r2));
  return 0;
}
