function seqs(n) {
	let num = Number(n);
  	let count = 0;
  	if(num < 3) {
		return count;
	} else {
	for(let i = 3; i < num; i++) {
		if(num - i > 3)
          count++;
		}
    }
  	return count%(10**9 + 7);
]

console.log(seqs(require("fs").readFileSync("/dev/stdin", "utf8")));