#include<stdio.h>
#include<math.h>
#include<stdlib.h>
int main(){
    int x1, y1, x2, y2, r1, r2, l, ans;
    scanf("%d%d%d", &x1, &y1, &r1);
    scanf("%d%d%d", &x2, &y2, &r2);
    l=sqrt(pow(x2-x1,2)+pow(y2-y1,2));
    if(l>r1+r2)ans=4;
    else if(l==r1+r2)ans=3;
    else if(l>abs(r1-r2))ans=2;
    else if(l==abs(r1-r2))ans=1;
    else ans=0;
    printf("%d\n", ans);
    return 0;
}