# -*- coding: utf-8 -*-
"""
Created on Wed Jun  5 09:53:48 2019

@author: Enya
"""

input_code = input()

A = input_code[0]*3 + input_code[1]
N = 0

if A>3:
    N = A//3

else:
    N = 0
    
print(N)
    