I will jump in only to also recommend that you keep a log of everything you eat, and the nutrional value of those food items. Eat 6 small meals a day. My mid-morning snack may be as simple as a single serving low-fat yogurt and some berries, or a hard boiled egg (and I often don't eat they yoke, just the white) and a handful of berries, or a small handful of mixed nuts and a half of an apple. Same in the middle of the afternoon.
Remember, it is not just how many calories you take it. You could sit down and eat a 5 pound bag of sugar and thereby go WAY above your max calories needed for a day, but take in almost zero nutrition (protein, vitamins and minerals).
When you keep a food log, you also need to keep a simple log of your training and rides as well as your sleep patterns, and take notice of when you feel good or bad on a ride and your energy levels during a ride and a race. You may start to see a pattern there... for example maybe you sleep an extra hour or two on the weekends and your weekend rides you feel better with more energy, whereas you maybe start to feel tired in your training as you get to the end of the week? Just an example, mind you.
There is no need to go overboard on the log, just a simple small spiral binder from wal-mart or target, or an excel spreadsheet with one tab for your food, one for your miles (again, just 3 columns of "where I rode, how many miles, how I felt", or organize it by the day, etc. Keep it simple enough that you'll use it and stick with it or what you prefer. There are a ga-gillion ways to do it from a spiral notebook to umpteen-bazillion software packages and phone apps.