Method and plant for converting grains