def print_formula(elements):
    """
    The input dictionary, atoms and their amount, is processed to produce
    the chemical formula as a string

    Parameters
    ----------
    elements : dict
        The elements that form the metabolite and their corresponding amount

    Returns
    -------
    formula : str
        The formula of the metabolite
    """
    formula = "".join([f"{k}{int(v)}" for k, v in elements.items()])
    return formula