def period_contribution(x):
    """
    Turns period--1, 2, 3, OT, etc--into # of seconds elapsed in game until start.
    :param x: str or int, 1, 2, 3, etc
    :return: int, number of seconds elapsed until start of specified period
    """
    try:
        x = int(x)
        return 1200 * (x - 1)
    except ValueError:
        return 3600 if x == 'OT' else 3900