Code for fertilizer estimation