function pint(s)   { return parseInt(s);   }
function pfloat(s) { return parseFloat(s); }
function even(s)   { return (s % 2) === 0; }
function odd(s)    { return (s % 2) === 1; }
Array.prototype.sortNumAsc  = function ()  { return this.sort((a, b) => (a - b)); }
Array.prototype.sortNumDesc = function ()  { return this.sort((a, b) => (b - a)); }
Array.prototype.sortStrAsc  = function ()  { return this.sort();                  }
Array.prototype.sortStrDesc = function ()  { return this.sort().reverse();        }
Array.prototype.without     = function (x) { return this.filter(e => e !== x);    }
function main(lines) {
  var arr = lines[0].split(' ').map(pint);
  var T = arr[0];
  var A = arr[1];
  var S = arr[2];
  var t = T;
  var a = A;
  var s = S;
  var times = 0;
  while (even(t) && even(a) && even(s)) {
    times++;
    var t2 = a / 2 + s / 2;
    var a2 = t / 2 + s / 2;
    var s2 = t / 2 + a / 2;
    t = t2; a = a2; s = s2;
    if (t === T && s === S && a === A) { console.log(-1); return; }
  }
  console.log(times);
}
main(require("fs").readFileSync("/dev/stdin", "utf8").split('\n').map(l => l.trim()));