#include "bits/stdc++.h" #ifndef err #define err(...) #define DebugWriteLine(...) #endif using namespace std; void Calc(); #define ALL(win) begin(win),end(win) #define RALL(win) (win).rbegin(),(win).rend() typedef int64_t ll; typedef uint64_t ull; int main() { cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(15); cin.exceptions(istream::failbit | istream::badbit); Calc(); cout.flush(); return 0; } template struct Iter { T&operator++() { return ++i; } constexpr const T&operator*() const { return i; } constexpr bool operator!=(const Iter &o) const { return i != o.i; } T i; }; struct Scanner { templatestatic A Next() { A a; cin >> a; return a; } templatestatic vector Array(int n) { vector a(n); for (A&i : a) cin >> i; return a; } static string Line() { string s; getline(cin, s); return s; } static int Int() { return Next(); } templateScanner&operator,(A&a) { a = Next(); return *this; } templateoperator A() { return Next(); } }in; /*---------------------------------------------------------------------*/ struct Char { Char() { c.reserve(6); } std::vector c; }; void Calc() { Char a; a.c.push_back(0xe2); a.c.push_back(0x80); a.c.push_back(0xa6); int maxi = 0; int cnt = 0; string s = in; Char c; for (int i = 0; i < s.size(); ) { c.c.clear(); bitset<8> b(s[i]); c.c.push_back(s[i++]); if (b[7] == 0) { continue; } for (int j = 6; b[j]; j--) { c.c.push_back(s[i++]); } if (c.c == a.c) maxi = max(++cnt, maxi); else cnt = 0; } cout << maxi << endl; }