Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() (int, error) {
	s, _ := nextString()
	return strconv.Atoi(s)
}

func nextString() (string, bool) {
	succeeded := scanner.Scan()
	if succeeded {
		return scanner.Text(), succeeded
	}
	return "", succeeded
}

func printArr(arr []string) {
	fmt.Println(strings.TrimRight(fmt.Sprintf("%+v", arr)[1:], "]"))
}

func main() {
	scanner.Split(bufio.ScanWords)

	const maxCapacity = 512 * 1024
	buf := make([]byte, maxCapacity)
	scanner.Buffer(buf, maxCapacity)

	n, _ := nextInt()
	if n == 1 {
		fmt.Println(0)
		return
	}

	s, succeeded := nextString()
	if !succeeded {
		fmt.Errorf("Scan failed")
		return
	}
	nOX := 0
	i := 1
	for {
		if s[i] != s[i-1] {
			nOX++
			i++
		}
		i++
		if i >= n {
			break
		}
	}
	fmt.Println(nOX)
}

Python: #
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N = I()
    S = ST()+"//"
    i=0
    ans =0
    while i < N:
        if S[i:i+2] in ("OX","XO"):
            ans += 1
            i +=1
        i+=1
    print(ans)
if __name__ == '__main__':
    main()

Python: n = int(input())
s = input()
cnt = 0
i = 0
while i+1 < n:
    if s[i:i+2] in ['OX', 'XO']:
        cnt += 1
        i += 2
    else:
        i += 1
print(cnt)

Python: import re
input()
print(re.sub(r'OX|XO','@',input()).count('@'))

Python: num=int(input())
ox=input()
ans=0
while True:
    if len(ox)<=1:
        break
    a=ox.find("OX",0,2)
    b=ox.find("XO",0,2)
    if a==0 or b==0:
        ox=ox[2:]
        ans+=1
    else:
        ox=ox[1:]

print(ans)

Python: 
def solve():
    N = int(input())
    S = input()
    stomp = 0
    for i in range(1, len(S)):
        pass
    i = 0
    while True:
        if i >= len(S) - 1:
            break
        if S[i] != S[i + 1]:
            stomp += 1
            i += 1
        i += 1
    print(stomp)


if __name__ == '__main__':
    solve()

Python: n = int(input())
s = input()

i = 0
ans = 0
while i+1 < n:
    if s[i:i+2] in ['OX','XO']:
        i += 2
        ans += 1
    else:
        i += 1
print(ans)

C++: #include <bits/stdc++.h>

using namespace std;

#define all(x) x.begin(), x.end()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define reps(i, m, n) for (int i = m; i <= n; ++i)

using i64 = long long;
using pii = pair<i64, i64>;

template<class A, class B>inline bool chmax(A &a, const B &b){return b > a ? a = b,1 : 0;}
template<class A, class B>inline bool chmin(A &a, const B &b){return b < a ? a = b,1 : 0;}

constexpr int INF = 0x3f3f3f3f;
constexpr i64 LINF = 0x3f3f3f3f3f3f3f3fLL;
constexpr int mod = int(1e9) + 7;

signed main()
{
  ios::sync_with_stdio(false);
  cin.tie(nullptr);

  int N;
  string S;
  cin >> N >> S;

  int ans = 0;
  int i = 0;
  while (true) {
    if (S.substr(i, 2) == "OX" || S.substr(i, 2) == "XO") {
      ++ans;
      i += 2;
    }
    else ++i;

    if (i >= N) break;
  }

  cout << ans << "\n";

  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(void){
  int N;
  cin >> N;
  string S;
  cin >> S;
  int cnt = 0, i = 0;
  for(int i = 0; i < N-1; i++){
    if((S[i] == 'O' && S[i+1] == 'X')||(S[i] == 'X' && S[i+1] == 'O')){
      cnt++;
      i++;
    }
    else{
      continue;
    }
  }
  cout << cnt << "\n";
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

#define REP(i, m, n) for (int i = (m); i < (int)(n); i++)
#define REPS(i, m, n) for (int i = (m); i <= (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define reps(i, n) for (int i = 0; i <= (int)(n); i++)
#define rrep(i, x) for (int i = ((int)(x)-1); i >= 0; i--)
#define rreps(i, x) for (int i = (int)(x); i >= 0; i--)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
typedef long long ll;
typedef pair<int, int> P;
const int inf = INT_MAX;
const ll INF = 1LL << 60;
const ll mod = 1e9 + 7;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
template<typename A, size_t N, typename T> void Fill(A (&array)[N], const T &val) { fill( (T*)array, (T*)(array+N), val ); }

int N;
string S;
int dp[101010];
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    cin >> N >> S;
    rep(i, N) {
        chmax(dp[i+1], dp[i]);
        if (i + 1 < N && S[i] != S[i+1]) chmax(dp[i+2], dp[i] + 1);
    }
    cout << dp[N] << endl;
    return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;

int cnt_circle_cross(int n, string s) {
    bool is_testing = true;
    int result = 0;
    for (int i = 1; i < n; i++)
        if (is_testing) {
            if (s[i - 1] != s[i]) {
                result++;
                is_testing = false;
            }
        } else
            is_testing = true;
    return result;
}

int main() {
    int n; cin >> n;
    string s; cin >> s;

    const int val = cnt_circle_cross(n, s);

    cout << val << endl;
}

C++: #include <iostream>
#include <vector>
using namespace std;

int main() {
  int n;
  string s;
  cin >> n >> s;
  int result = 0;
  int i;
  for (i = 1; i < n; i++) {
    if (s.at(i) != s.at(i - 1)) {
      result++;
      i++;
    }
  }
  cout << result << endl;
  return 0;
}

C++: #include<iostream>
#include<sstream>
#include<fstream>
#include<string>
#include<vector>
#include<deque>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<algorithm>
#include<functional>
#include<utility>
#include<bitset>
#include<cmath>
#include<cstdlib>
#include<ctime>
#include<cstdio>

using namespace std;

#define REP(i,n) for(int i=0;i<int(n);i++)
#define foreach(c,itr) for(__typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++)
typedef long long ll;
typedef pair<int,int> P;

int a[2030],c[110];

int main(void){
	          int i;

	          cin.tie(0);  ios_base::sync_with_stdio(false);

	          int N;
	          string s;
	          cin >> N >> s;

	          int ans=0;
	          for(i=0;i<N;i++){
	        	  if(i==N-1) break;
	        	  if((s[i]=='O' && s[i+1]=='X') || (s[i]=='X' && s[i+1]=='O')){
	        		  ans++;
	        		  i++;
	        	  }
	          }

	          cout << ans << endl;

	          return 0;
}