function restaurant(num) {
    let paid = num * 800;
    let counter = 0;
    for (num; num >= 0; num -= 15) {
        counter += 1
    }
    let returned = (counter * 200) + 200;
    return paid - returned;
}