Let $A = {1, 2, ..., 2014}$. Find the number of functions $f: A \rightarrow A$ satisfied the following properties.
There exists $k \in A$ such that $f$ is non-decreasing function on $\{1, 2, ..., k\}$ and $f$ is non-increasing function on $\{k, k+1,..., 2014\}$.
$|f(n+1)-f(n)| \leq 1 \;\;\forall n= 1, 2, ..., 2013$.
$f(1) = f(2014) = 1$.
My attempt :
Let $f$ be function such that f(k) is the maximum value.
$f(1) \leq f(2) \leq ... \leq f(k)$.
$f(k) \geq f(k+1) \geq ... \geq f(2014)$.
Let $f(k) = l$
so $1 \leq f(i) \leq l \;\;\forall i= 2, 3, ..., k-1$.
$l \leq f(i) \leq l \;\;\forall i= k+1, k+2, ..., 2013$.
Please suggest how to proceed.