let solve n =
  let paid = n * 800 and
      num_refund = n / 15 in
  let refund = 200 * num_refund in
  paid - refund

let () =
  let rec read () =
    try let ans = (Scanf.scanf "%d\n" solve) in
        Printf.printf "%d\n" ans
    with End_of_file -> ()
  in
  read ()
;;
