class Fraction:

    def __init__(self, n, m):
        self.numerator = n
        self.denom = m

    def __str__(self):
        return str(self.numerator) + "/" + str(self.denom)

    def __add__(self, other):
        if isinstance(other, int):
            print("Im in if")
            return
        return Fraction(self.numerator + other.numerator,
                        self.denom + other.denom)

    def __radd__(self, other):
        return self + other



rational = Fraction(1, 1)
print(5 + rational)

# x = 5
# print(x.denom)