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;
	
	int count = 0;
	while(count < 10000){
		if(a % 2 == 0 && b % 2 == 0 && c % 2 == 0){
			long a2 = b / 2 + c / 2;
			long b2 = a / 2 + c / 2;
			long c2 = a / 2 + b / 2;
			a = a2, b = b2, c = c2;
			count += 1;
			}
		else break;
		}
	
	int ans;
	if(count > 1000) ans = -1;
	else ans = count;
	
	ans.writeln;
	}