process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', (line) => {
  lines.push(line);
});
reader.on('close', () => {
    let [A, B, C] = lines[0].split(" ").map(v=>v-0);
    let ans = 0;
    while(A%2===0 && B%2===0 && C%2===0){
        if(ans > 100000) break;
        const a = B/2+C/2;
        const b = A/2+C/2;
        const c = B/2+A/2;
        A = a; B = b; C = c;
        ans++;
    }
    console.log(ans>100000?-1:ans);
    
});
