public static void Main(String[] args)
Shop filial_Abovyan = new Shop();
Shop filial_Bagrevand = new Shop();
private int[] price = new int[3];
public int getPrice(int type) {
public Worker(int[] a, int limit)
public int getIncome() {return income;}
public void resetHour() { hour = 0;}
public void addWork(int workNow, int type)
} else if( hour + workNow <= hour_limit)
extra = hour + workNow - hour_limit;
normal = hour_limit - hour;
income = income + normal * price[type] + extra * price[type]*2;
public int getHourLimit() {return hour_limit;}
public int availableFor() { return hour_limit - hour;}
private Worker wAshkhen = new Worker(new int[]{1000,1200,1500}, 4);
private Worker wAnul = new Worker(new int[]{700,800,920}, 9);
public void doWork(int hour, int type) {
if( wAshkhen.availableFor() > wAnul.availableFor() )
wAshkhen.addWork(hour, type);
wAnul.addWork(hour, type);
return wAshkhen.getIncome() + wAnul.getIncome();