In this paper we prove a discrete version of Tanaka's Theorem \cite{Ta} for the Hardy-Littlewood maximal operator in dimension n=1, both in the non-centered and centered cases. For the discrete non-centered maximal operator M we prove that, given a function f:Z→R of bounded variation, Var(Mf)≤Var(f), where Var(f) represents the total variation of f. For the discrete centered maximal operator M we prove that, given a function f:Z→R such that f∈ℓ1(Z), Var(Mf)≤C∥f∥ℓ1(Z). This provides a positive solution to a question of Hajłasz and Onninen \cite{HO} in the discrete one-dimensional case.