"use strict";
const Main = (input) =>{
   let xs = input.trim().split(' ').map(v=>parseInt(v,10));
   let ans = xs[0] / 3;
   let ans1 = (xs[0] - 2) / 3;
   console.log(Math.floor(ans1 + ans));
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));