def check_balanced(input_str):
    """
    Checks if input string is balanced paranthesis
    """
    stack = list()
    balanced = True
    for char_ in input_str:
        if char_ == '(':
            stack.append(char_)
        elif char_ == ')':
            if len(stack) == 0:
                balanced = False
                break
            else:
                _ = stack.pop()
        else:
            continue

    if balanced and len(stack) == 0:
        return True

    return False