A, B = gets.split.map &:to_i def f(n, k) 50 * n + 500 * n / (8 + 2 * k) end p f A, B