#include<stdio.h>
#include<math.h>
#define distance(x, y) sqrt(pow(x, 2) + pow(y, 2))
main()
{
        int cx1, cx2, cy1, cy2, cr1, cr2;
        double len, rp, rm;
        scanf("%d %d %d", &cx1, &cy1, &cr1);
        scanf("%d %d %d", &cx2, &cy2, &cr2);
        len = distance(cx1 - cx2, cy1 - cy2);
        rp = abs(cr1 + cr2);
        rm = abs(cr1 - cr2);
        if(len > rp){
                printf("4\n");
        }else if(len == rp){
                printf("3\n");
        }else if(len > rm){
                printf("2\n");
        }else if(len == rm){
                printf("1\n");
        }else{
                printf("0\n");
        }
}