import std.stdio;
import std.conv, std.array, std.algorithm, std.string;
import std.math, std.random, std.range, std.datetime;
import std.bigint;
string read(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; }

void main(){
	long a = read.to!long;
	long b = read.to!long;
	long c = read.to!long;
	
	long x = b - a;
	long y = c - a;
	
	long ans;
	if(x == 0 && y == 0) ans = -1;
	else{
		ans = 0;
		while(x % 2 == 0 && y % 2 == 0){
			ans += 1;
			x /= 2;
			y /= 2;
			}
		}
	
	ans.writeln;
	}