int branchs (int a, int b, int c)
{
	int d = 0;
	int ii;
	if((a==0 || b==0) && c==0){
		d = 0;
	}else{
		for(ii=1; ii<a && d<3; ii++){
			switch(d){
			case 0:
				d = a+b;
				break;
			case 1:
				d = a+b+c;
				break;
			default:
				d=b+c;
				break;
			}
		}
	}
	return d;
}
