const input = require('fs').readFileSync('/dev/stdin', 'utf8').split(' ');

let A = parseInt(input[0]);
let B = parseInt(input[1]);
let C = parseInt(input[2]);

let count = 0;

if (A === B && B === C) {
	console.log(-1);
} else {
	while (true) {
		if (!(A % 2 === 0 && B % 2 === 0 && C % 2 === 0)) {
			break;
		}
		let _A = (B + C) / 2;
		let _B = (C + A) / 2;
		let _C = (A + B) / 2;
		A = _A; B = _B; C = _C;
		count++;
	}
	console.log(count);
}
