def preu(p, m, tfi):
    idx = p[m]
    tini = p.arribades[idx]
    deltat = (tfi - tini)
    segons = deltat.total_seconds()
    hores = segons // 3600
    if segons % 3600 > 0:
        hores = hores + 1
    return 10 + 0.5 * hores
    
