def corresponding_directory_perm(perm):
    """Given 4, returns 5. Given 6, returns 7.

    Based on desired file permissions, returns corresponding dir permissions.
    """
    perm = int(perm)
    return perm + 1 if perm % 2 == 0 and perm > 3 else perm
