#include<iostream>
#include<vector>
#include<map>
#include<set>
#include<algorithm>
#include<numeric>
#include<limits>
#include<bitset>
#include<functional>
#include<type_traits>

namespace lib
{
	template<std::uint64_t Mod>struct modnum;
	template<class T>constexpr T pow(T base, std::size_t p)
	{
		if (p == 0)
		{
			return T(1);
		}
		else if (p == 1)
		{
			return base;
		}
		else if (p == 2)
		{
			return base*base;
		}
		else if (p % 2 == 0)
		{
			return pow(pow(base, p / 2), 2);
		}
		else
		{
			return pow(pow(base, p / 2), 2)*base;
		}
	}
	template<std::uint64_t Mod>constexpr auto inverse(modnum<Mod> const&);

	template<std::uint64_t Mod>struct modnum
	{
		static constexpr auto mod = Mod;
		std::uint64_t val;
		modnum() = default;
		constexpr modnum(std::uint64_t v) :val(v%Mod)
		{

		}

		constexpr modnum& operator+=(modnum const& v)
		{
			val += v.val;
			val %= mod;
			return *this;
		}
		constexpr modnum& operator-=(modnum const& v)
		{
			val += mod - v.val;
			val %= mod;
			return *this;
		}
		constexpr modnum& operator*=(modnum const& v)
		{
			val *= v.val;
			val %= mod;
			return *this;
		}
		constexpr modnum& operator/=(modnum const& v)
		{
			return operator*=(inverse(v));
		}
	};
	template<std::uint64_t Mod>constexpr auto operator+(modnum<Mod> lhs, modnum<Mod>const& rhs)
	{
		return lhs += rhs;
	}
	template<std::uint64_t Mod>constexpr auto operator-(modnum<Mod> lhs, modnum<Mod>const& rhs)
	{
		return lhs -= rhs;
	}
	template<std::uint64_t Mod>constexpr auto operator*(modnum<Mod> lhs, modnum<Mod>const& rhs)
	{
		return lhs *= rhs;
	}
	template<std::uint64_t Mod>constexpr auto operator/(modnum<Mod> lhs, modnum<Mod>const& rhs)
	{
		return lhs /= rhs;
	}

	template<std::uint64_t Mod>constexpr auto inverse(modnum<Mod>const& base)
	{
		return pow(base, Mod - 2);
	}

	template<class T>constexpr auto clamp(T v)
	{
		return std::max(v, T());
	}
	template<class T>void sort(std::vector<T>& vec)
	{
		std::sort(vec.begin(), vec.end());
	}

	template<class T>auto lower_bound(std::vector<T>const& vec, T v)
	{
		return std::distance(vec.begin(), std::lower_bound(vec.begin(), vec.end(), v));
	}
	template<class T>auto upper_bound(std::vector<T>const& vec, T v)
	{
		return std::distance(vec.begin(), std::upper_bound(vec.begin(), vec.end(), v));
	}


	template<class Tag>struct dmod
	{
		std::uint64_t val;
		static std::uint64_t mod;
		dmod(std::uint64_t v = 0) :val(v%mod)
		{

		}
		dmod& operator+=(dmod const& rhs)
		{
			val += rhs.val;
			val %= mod;
			return *this;
		}
		dmod& operator-=(dmod const& rhs)
		{
			val += mod - rhs.val;
			val %= mod;
			return *this;
		}
		dmod& operator*=(dmod const& rhs)
		{
			val *= rhs.val;
			val %= mod;
			return *this;
		}
	};
	template<class Tag>dmod<Tag> operator+(dmod<Tag> lhs, dmod<Tag> const& rhs)
	{
		return lhs += rhs;
	}
	template<class Tag>dmod<Tag> operator-(dmod<Tag> lhs, dmod<Tag> const& rhs)
	{
		return lhs -= rhs;
	}
	template<class Tag>dmod<Tag> operator*(dmod<Tag> lhs, dmod<Tag> const& rhs)
	{
		return lhs *= rhs;
	}
	template<class Tag>std::uint64_t dmod<Tag>::mod;

	struct scope_exit
	{
		std::function<void(void)> func;
		scope_exit(std::function<void(void)> f) :func(f)
		{

		}
		~scope_exit()
		{
			func();
		}
	};

	template<int val>using int_tag = std::integral_constant<int, val>;
}

void Main();
int main()	
{
	std::cin.tie(nullptr);
	std::cin.sync_with_stdio(false);
	Main();
}

void Main()
{
	std::uint64_t a, b, c;
	std::cin >> a >> b >> c;
	std::set<std::tuple<std::uint64_t, std::uint64_t, std::uint64_t>> loop;
	for (int i = 0;; ++i)
	{
		if (a % 2 == 1 || b % 2 == 1 || c % 2 == 1) 
		{
			std::cout << i << std::endl;
			return;
		}
		auto u = (b + c) / 2;
		auto v = (c + a) / 2;
		auto w = (a + b) / 2;
		if (loop.count(std::make_tuple(u, v, w)))
		{
			std::cout << -1 << std::endl;
			return;
		}
		loop.emplace(u, v, w);
		a = u;
		b = v;
		c = w;
	}
}

Measured memory_bytes: 256