while w_s = gets
	w = w_s.to_i
	price = 0
	if w == -1
		break
	end
	
	if w <=10
		price = 4280 - 1150
		puts price
	elsif 10 < w && w <= 20
		price = 4280 - (1150 + 125 * (w - 10))
		puts price
	elsif 20 < w && w <= 30
		price = 4280 - (2400 + 140 * (w - 20))
		puts price
	elsif 30 < w
		price = 4280 - (3800 + 160 * (w - 30))
		puts price
	end
end