/*No.586 ダブルブッキング*/ import java.io.*; import java.util.*; public class No586 { public static void main(String[] args) { try(BufferedReader input =new BufferedReader(new InputStreamReader(System.in))){ int YukiPrice=Integer.parseInt(input.readLine()); int OtherPrice=Integer.parseInt(input.readLine()); byte Reservation=Byte.parseByte(input.readLine()); short[] RoomNum=new short[Reservation]; short ChkRoom; byte booking=0; for(byte i=0;i