A non-transitory computer-readable medium including a program for decoding a current block included in a bitstream, the program, when executed by a processor, causing the processor to perform processes, the processes comprising:
- searching, from one or more candidates, for a first candidate having a first motion vector that has been used to decode a first block, the first block being spatially or temporally adjacent to the current block;
- adding the first candidate to a motion vector candidate list, when the first candidate is available in the searching;
- deriving two or more second candidates, each having a second motion vector being a zero vector, when the first candidate is unavailable in the searching;
- adding the two or more second candidates to the motion vector candidate list until a number of candidates in the motion vector candidate list equals a predetermined maximum candidate number;
- decoding an index identifying a motion vector, in the motion vector candidate list, for decoding the current block;
- and
- decoding a current block using the motion vector identified by the index,
- wherein the motion vector candidate list includes the two or more second candidates.