def double_day(bday1, bday2):
    """Calculates the day when one person is twice as old as the other one"""
    if bday1 > bday2:
        delta = bday1 - bday2
        double_day = bday1 + delta
    else:
        delta = bday2 - bday1
        double_day = bday2 + delta
    return double_day