import re


def validate_account_to_int(account):
    """
    Validates the the provided string is in valid AdWords account format and converts it to integer format.

    :param (str, int) account: AdWords Account
    :return:                   Account ID as integer
    """

    account = str(account).strip().replace('-', '')
    if re.match("^[0-9]{10}$", account):
        return int(account)
    raise ValueError("Invalid account format provided: {}".format(account))