def f(n,k) 50 * n + (250 * n) / (4 + k) end A, B = gets.split.map(&:to_i) puts f(A,B)