This paper is a contribution to the analysis of optimal monetary policy. It begins with a critical assessment of the existing literature, arguing that most work is based on implausible models of inflation-output dynamics. It then suggests that this problem may be solved with some recent behavioral models, which assume that price setters are slow to incorporate macroeconomic information into the prices they set. A specific such model is developed and used to derive optimal policy. In response to shocks to productivity and aggregate demand, optimal policy is price level targeting. Base drift in the price level, which is implicit in the inflation targeting regimes currently used in many central banks, is not desirable in this model. When shocks to desired markups are added, optimal policy is flexible targeting of the price level. That is, the central bank should allow the price level to deviate from its target for a while in response to these supply shocks, but it should eventually return the price level to its target path. Optimal policy can also be described as an elastic price standard: the central bank allows the price level to deviate from its target when output is expected to deviate from its natural rate.