#!/usr/bin/python

import math
import os
from os import *
from sys import *
from resource import *

compiler = argv[1]
compiler_name = os.path.basename(compiler)

spawnl(os.P_WAIT, compiler,
                  compiler_name, 'TimeMe.hs', '-o', 'TimeMe', '-O2')
spawnl(os.P_WAIT, './TimeMe', 'TimeMe')

xs = getrusage(RUSAGE_CHILDREN);
print (300*int(math.ceil(xs[0] + xs[1])))

