def DISTANCE(inp):
    args = inp.split()
    try:
        if (args[1] == 'm'):
            return (float(args[0]) * 1000.0)
    except:
        return float(args[0])
def DISTANCE(inp):
    args = inp.split()
    try:
        if (args[1] == 'm'):
            return (float(args[0]) * 1000.0)
    except:
        return float(args[0])