The problem of forming herd immunity to an infectious disease, i.e. influenza, which is optimal to the population, is often considered as a modification of the classical Susceptible-Infected-Recovery model. However the annual vaccination of the total population is quite expensive and is not obligatory for every individual. Any agent in population has a choice: whether or not to participate in the vaccination program. So each epidemic season society confronts a dilemma: how to maintain the necessary immunization level which is subject to individual choice. Apparently each available alternative incurs different costs and benefits for an individual agent and the population in total. We compare social and individual benefits and expenses in two cases: optimal vaccination policy is used to preserve the optimal herd immunity; agents participate in the vaccination campaign, considering only individual benefits. It's supposed that agent choices do not depend only on the cost generated by agents' choices during the epidemic period. Agents also take into account all available information, received from neighbors, media and former experience. Every agent compares it's own preferences and the alternatives, chosen by neighbors and can update its choice every season. We study the influence of information about previous epidemics on the decision making process. We investigate an optimal control problem to study the optimal vaccination behavior during an epidemic period based on classical Susceptible-Infected-Recovery model and present a procedure for making vaccination decisions.