Japanese citizens have cultivated good food habits for generations. They are also some of the healthiest and longest living people in the world. According to the OECD (the Organization for Economic Co-operation and Development), the average Japanese male can expect to live 81 years from birth, tied for second just behind Switzerland with 81.7 years. The average female can expect to live 87.1 years from birth, which ranks the highest in the world. Combined with its low mortality rate, Japan has more centenarians living within its borders than almost anywhere else.

The reasons behind this phenomenon are complex. Life expectancy is the result of many different factors, including the quality of healthcare, physical activity, the environment, and even our own DNA. But diet could account for as much as 30 percent of the difference in individual’s lifespans. And the Japanese have some of the best dietary habits in the world.

According to a study published in early 2016 in the British Medical Journal, participants who closely adhered to the Japanese national food guide had a 15 percent lower mortality rate, mostly due to a reduction in death from heart disease. Overall, the Japanese stuck to their dietary guidelines closely, whereas about 75 percent of Americans don’t even get enough vegetables, fruits, and oils in their diets.

The Japanese diet is not alone in promoting longevity. Evidence suggests that the Mediterranean and Nordic diets are also correlated with prolonged lifespans. There could be a few different reasons for this. One idea is that these diets work by very similar mechanisms — eating more fish, beans, nuts, seeds, legumes, and whole grains and less red meat, dairy, and snacks may help people avoid cellular damage or inflammation that degrades the body’s tissue over time. Another potential explanation is that these countries simply have better dietary behavior. People eat well because they are encouraged by their surrounding food environments and culture.

Both factors likely play a critical role. But whatever the case, there are a few important rules to keep in mind. First, your overall dietary patterns matter more than specific nutrient choices. The emphasis on a single nutrient such as fats or carbohydrates may distract from the larger picture.

Second, how we feel or think affects what we eat. Even seemingly unrelated factors such as one’s job or life circumstances can matter.

Third, it’s important to consume whole foods that satiate you and stop you from overeating. Austere or restrictive fad diets are likely to fail because they set up standards we cannot possibly achieve. You need to feel comfortable and satisfied with your diet.