# -*- coding:utf-8 -*-
class Transform:
    def calcCost(self, A, B):
        # write code here
        temp = A ^ B 
        counter = 0
        
        while temp > 0:
            if temp & 1 == 1:
                counter += 1
            temp >>= 1
        return counter