In the classical simple random walk the steps are independent, that is, the walker has no memory. In contrast, in the elephant random walk, which was introduced by Schütz and Trimper [19] in 2004, the next step always depends on the whole path so far. Our main aim is to prove analogous results when the elephant has only a restricted memory, for example remembering only the most remote step(s), the most recent step(s), or both. We also extend the models to cover more general step sizes.