'use strict';

const Main = input => {
  const howmany = parseInt(input, 10);
  const amari = howmany % 3;
  const Answer = () => {
    switch (amari) {
      case 1:
        return (howmany - 1) / 3;

      case 2:
        return (howmany - 2) / 3;

      case 0:
        return howmany / 3;

      default:
      return 0;
    }
  };
  console.log(Answer());
};
Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
