class Transform { public: int calcCost(int A, int B) { // write code here int ans=0; while(A||B){ ans += (A%2!=B%2); A>>=1; B>>=1; } return ans; } };