import re


def mem_convert(ram):
    """Convert RAM measurements to Gigabytes"""
    convert = {
        "GB":1,
        "MB":0.001
    }
    measure = ram[-2:]
    num = int(re.findall(r"\d+", ram)[0])
    return num * convert[measure]