a,b,x=map(int,input().split()) ans=0 tmp=0 while tmp