#include<iostream>
#include<cstdio>
using namespace std;
int a,b,c,ans;
int main()
{
    scanf("%d%d%d",&a,&b,&c);
    if(a%2==0&&a==b&&b==c){puts("-1");return 0;}
    while(a%2==0&&b%2==0&&c%2==0)
    {
        int aa=a>>1,bb=b>>1,cc=c>>1;
        a=bb+cc;b=aa+cc;c=aa+bb;++ans;
    }
    printf("%d\n",ans);
    return 0;
}