#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

#[allow(unused_macros)]
macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

#[allow(unused_macros)]
macro_rules! debug {
    ($($a:expr),*) => {
        eprintln!(concat!($(stringify!($a), " = {:?}, "),*), $($a),*);
    }
}

fn f(s: &[char]) -> bool {
    let m = s.len();
    for i in 0..m {
        if s[i] != s[m - 1 - i] {
            return false;
        }
    }
    true
}

use std::iter::Iterator;

fn main() {
    input! {
        n:usize,
    }

    let mut ans = false;

    for elem in 1..10 {
        if n / elem < 10 {
            ans = true;
        }
    }

    if ans {
        println!("Yes")
    }else{
        println!("No")
    }

}


macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let mut s = {
            use std::io::Read;
            let mut s = String::new();
            std::io::stdin().read_to_string(&mut s).unwrap();
            s
        };
        let mut iter = s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

macro_rules! input_inner {
    ($iter:expr) => {};
    ($iter:expr, ) => {};

    ($iter:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };

    ($iter:expr, mut $var:ident : $t:tt $($r:tt)*) => {
        let mut $var = read_value!($iter, $t);
        input_inner!{$iter $($r)*}
    };
}

macro_rules! read_value {
    ($iter:expr, ( $($t:tt),* )) => {
        ( $(read_value!($iter, $t)),* )
    };

    ($iter:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($iter, $t)).collect::<Vec<_>>()
    };

    ($iter:expr, chars) => {
        read_value!($iter, String).chars().collect::<Vec<char>>()
    };

    ($iter:expr, usize1) => {
        read_value!($iter, usize) - 1
    };

    ($iter:expr, $t:ty) => {
        $iter.next().unwrap().parse::<$t>().expect("Parse error")
    };
}

pub trait LexicalPermutation {
    /// Return `true` if the slice was permuted, `false` if it is already
    /// at the last ordered permutation.
    fn next_permutation(&mut self) -> bool;
    /// Return `true` if the slice was permuted, `false` if it is already
    /// at the first ordered permutation.
    fn prev_permutation(&mut self) -> bool;
}

impl<T> LexicalPermutation for [T]
where
    T: Ord,
{
    /// Original author in Rust: Thomas Backman <serenity@exscape.org>
    fn next_permutation(&mut self) -> bool {
        // These cases only have 1 permutation each, so we can't do anything.
        if self.len() < 2 {
            return false;
        }

        // Step 1: Identify the longest, rightmost weakly decreasing part of the vector
        let mut i = self.len() - 1;
        while i > 0 && self[i - 1] >= self[i] {
            i -= 1;
        }

        // If that is the entire vector, this is the last-ordered permutation.
        if i == 0 {
            return false;
        }

        // Step 2: Find the rightmost element larger than the pivot (i-1)
        let mut j = self.len() - 1;
        while j >= i && self[j] <= self[i - 1] {
            j -= 1;
        }

        // Step 3: Swap that element with the pivot
        self.swap(j, i - 1);

        // Step 4: Reverse the (previously) weakly decreasing part
        self[i..].reverse();

        true
    }

    fn prev_permutation(&mut self) -> bool {
        // These cases only have 1 permutation each, so we can't do anything.
        if self.len() < 2 {
            return false;
        }

        // Step 1: Identify the longest, rightmost weakly increasing part of the vector
        let mut i = self.len() - 1;
        while i > 0 && self[i - 1] <= self[i] {
            i -= 1;
        }

        // If that is the entire vector, this is the first-ordered permutation.
        if i == 0 {
            return false;
        }

        // Step 2: Reverse the weakly increasing part
        self[i..].reverse();

        // Step 3: Find the rightmost element equal to or bigger than the pivot (i-1)
        let mut j = self.len() - 1;
        while j >= i && self[j - 1] < self[i - 1] {
            j -= 1;
        }

        // Step 4: Swap that element with the pivot
        self.swap(i - 1, j);

        true
    }
}

#[allow(dead_code)]
fn sieve_of_eratosthenes(n: usize) -> Vec<usize> {
    // spf:
    // store smallest prime factor of number
    // 最小の素因数を格納
    // is_prime:
    // 配列番号が素数であるかどうかを示す
    let mut spf = vec![None; n + 1];
    let mut is_prime = vec![true; n + 1];
    let mut primes = Vec::new();

    // 0 と 1 は素数ではない
    is_prime[0] = false;
    is_prime[1] = false;

    for i in 2..n + 1 {
        // is_prime[i]:
        // それ以下の素数で割り切られていなければ True となる
        if is_prime[i] {
            // この if 文より i は素数なので
            primes.push(i);

            // 素数はそれ自身の最も小さい素因数であるから
            spf[i] = Some(i);
        }

        // 全ての prime の倍数(prime * i)を取り除く
        for prime in &primes {
            // prime が i の最も小さい因数よりも大きくなってしまったら探索終了
            if i * prime >= n + 1 || prime > &spf[i].unwrap() {
                break;
            }

            is_prime[i * prime] = false;

            // i * primes[j] の最も小さい素数は primes[j] 自身
            spf[i * prime] = Some(*prime);
        }
    }
    primes
}
use std::cmp::Ordering;
#[derive(Eq, PartialEq, Clone, Debug)]
pub struct Rev<T>(pub T);

impl<T: PartialOrd> PartialOrd for Rev<T> {
    fn partial_cmp(&self, other: &Rev<T>) -> Option<Ordering> {
        other.0.partial_cmp(&self.0)
    }
}

impl<T: Ord> Ord for Rev<T> {
    fn cmp(&self, other: &Rev<T>) -> Ordering {
        other.0.cmp(&self.0)
    }
}
#[allow(dead_code)]
fn gcd(a: u64, b: u64) -> u64 {
    if b == 0 {
        a
    } else {
        gcd(b, a % b)
    }
}
#[allow(dead_code)]
fn lcm(a: u64, b: u64) -> u64 {
    a / gcd(a, b) * b
}

#[allow(dead_code)]
fn expected(p: u64) -> f64 {
    let p = p as f64;
    ((p * (p + 1.0)) / 2.0) / p
}

#[allow(unused_imports)]
use std::collections::BTreeSet;
#[allow(unused_imports)]
use std::collections::VecDeque;

#[allow(unused_mut)]
#[allow(unused_variables)]
#[allow(non_snake_case)]
fn main() {
    input! {A: i32, B: i32};

    let ans = if A > 10 && B > 10 { -1 } else { A * B };

    println!("{}", ans);
}


func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

let ab = readInts()
let a = ab[0]
let b = ab[1]
if (1<=a)&&(a<=9)&&(1<=b)&&(b<=9){
  print(a*b)
}else{
  print(-1)
}


func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

let num=readInts()
let a=num[0]
let b=num[1]

if a>9||b>9{
  print(-1)
}else{
  print(a*b)
}


let arr=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}

let a : Int = arr[0]
let b : Int = arr[1]

func is1to9( number: Int ) -> Bool {
  if( number >= 1 && number <= 9 ) {
    return true
  } else {
    return false
  }
}

if( is1to9(a) && is1to9(b) ) {
  print( a * b )
} else {
  print( "-1" )
}


func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

let ab = readInts()
let a = ab[0]
let b = ab[1]
if (1<=a<=9)&&(1<=b<=9){
  print(a*b)
}else{
  print(-1)
}


if A < 10 && B < 10 {
  return A * B
} else {
  return -1
}


let input_line = readLine()!.characters.splits(" ")
let a = input_line[0]
let b = input_line[1]
if a > 9 || b > 9 {
	print("-1")
} else {
	print("\(a * b)")
}


function main(input: string[]): void {
    const a = shi(input);
    const b = shi(input);
    if (9 < a || 9 < b) {
        puts(-1);
    } else {
        puts(a * b);
    }
}

// === BEGIN MODULE ===
function shi(array: string[]): number {
    return parseInt(array.shift());
}
function shf(array: string[]): number {
    return parseFloat(array.shift());
}
function puts(...message: any[]): void {
    process.stdout.write(message.join(' ') + '\n');
}
// === END   MODULE ===

import { readFileSync } from 'fs';
if (process.argv[1] == __filename) {
    const path = process.argv[2] || '/dev/stdin';
    const input = readFileSync(path, 'utf-8');
    main(input.split(/\s+/));
}


import * as fs from "fs";

const input = (fs.readFileSync("/dev/stdin", "utf8") as string).split("\n");
//const n = +input[0];
//const a = [];
//for(let i=0;i<n;i++){
//	a.push(input[i+1].split(" ").map((x:string):number=>+x));
//}

//const [n, m] = input[0].split(" ").map((x: string): number => +x);
//const a = input[1].split(" ").map((x: string): number => +x);

function compareFunc(a, b){
    return a-b;
}

const [a, b]: number[] = input[0].split(' ').map((x: string): number => +x);

if(a >=10 || b>= 10){
    console.log(-1);
}else{
    console.log(a*b);
}


function main(input) {
    const [a,b] = input.split(' ').map(v => parseInt(v));
    console.log(a < 10 && b < 10 ? a*b : -1);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


import * as fs from 'fs';

//in
//
//out
//
const main = (inp: string) => {
    const [a, b]: number[] = inp.split(' ').map(Number);

    if (a > 10 || b > 10) {
        console.log(-1);
    } else {
        console.log(a * b);
    }

};

main(fs.readFileSync('/dev/stdin', 'utf8').trim());


'use strict'
function main(input: String) {
    const [a, b] = input.split(' ').map(v => parseInt(v));
    console.log(a * b <= 81 ? a * b : -1);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


'use strict'
function main(input: String) {
    const [a, b] = input.split(' ').map(v => parseInt(v));
    console.log(a * b >= 81 ? a * b : -1);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


N = int(input())
S = input()

from math import ceil

def main():
    ans = N
    pre = S[0]
    for s in S[1:]:
        if pre == s:
            ans -= 1
        pre = s
    print(ans)
    return

if __name__ == "__main__":
    main()


def solve(s: str) -> int:
  ret = 0
  cur_c = None
  for c in s:
    if c != cur_c:
      ret += 1
      cur_c = c
  return ret

n = int(input().strip())
s = input().strip()

print(solve(s))


def T():
    N=int(input())
    c=''
    t=0
    for s in input():
        if s==c:
            N-=1
        c=s
    return(N)
print(T())


N = int(input())
S = input()

current = ""
ans = ""
for s in S:
    if s != current:
        current = s
        ans += s

# print(len(ans))
print(ans)


n=int(input())
a=input()
a=list(a)

c=0

for i in range(n-1):
    if a[i]!=a[i+1]:
        c+=1

if a[-1]!=a[-2]:
    c+=1

if c==0:
    c+=1

print(c)


n=int(input())
s=input()
ans=''
pass_count=0
for i in range(n):
  if i == (n-1):
    break
  if s[i] == s[i+1]:
    pass_count+=1
    pass
  else:
    ans=ans+s[i]
    if i==(n-2):
      ans+=s[i+1]
if pass_count == n-1:
  print('1')
else:
  print(len(ans))


import org.omg.CORBA.INTERNAL;
import org.omg.CORBA.Policy;

import java.io.*;
import java.math.*;
import java.util.*;
import java.lang.*;

public class Main implements Runnable {
    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;
        private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();

            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }

                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }

        public int nextInt() {
            int c = read();

            while (isSpaceChar(c))
                c = read();

            int sgn = 1;

            if (c == '-') {
                sgn = -1;
                c = read();
            }

            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));

            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;

            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            while (!isSpaceChar(c));
            return res * sgn;
        }

        public double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new InputMismatchException();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public String readString() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            }
            while (!isSpaceChar(c));

            return res.toString();
        }

        public boolean isSpaceChar(int c) {
            if (filter != null)
                return filter.isSpaceChar(c);
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public String next() {
            return readString();
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);
        }
    }

    public static void main(String args[]) throws Exception {
        new Thread(null, new Main(), "Main", 1 << 26).start();
    }

    static long gcd(long a, long b) {
        if (b == 0) return a;
        return gcd(b, a % b);
    }

    static int gcd(int a, int b) {
        if (b == 0) return a;
        return gcd(b, a % b);
    }

    static long modPow(long a, long p, long m) {
        if (a == 1) return 1;
        long ans = 1;
        while (p > 0) {
            if (p % 2 == 1) ans = (ans * a) % m;
            a = (a * a) % m;
            p >>= 1;
        }
        return ans;
    }

    static long modInv(long a, long m) {
        return modPow(a, m - 2, m);
    }

    static class Radix {

        static int getMax(int arr[], int n) {
            int mx = arr[0];
            for (int i = 1; i < n; i++)
                if (arr[i] > mx)
                    mx = arr[i];
            return mx;
        }

        static void countSort(int arr[], int n, int exp) {
            int output[] = new int[n];
            int i;
            int count[] = new int[10];
            Arrays.fill(count, 0);

            for (i = 0; i < n; i++)
                count[(arr[i] / exp) % 10]++;

            for (i = 1; i < 10; i++)
                count[i] += count[i - 1];

            for (i = n - 1; i >= 0; i--) {
                output[count[(arr[i] / exp) % 10] - 1] = arr[i];
                count[(arr[i] / exp) % 10]--;
            }

            for (i = 0; i < n; i++)
                arr[i] = output[i];
        }

        static void radixsort(int arr[], int n) {
            int m = getMax(arr, n);

            for (int exp = 1; m / exp > 0; exp *= 10)
                countSort(arr, n, exp);
        }

    }

    class DSU {
        int par[], size[], connectedComponent;

        DSU(int n) {
            par = new int[n];
            size = new int[n];
            for (int i = 0; i < n; i++) {
                size[i] = 1;
                par[i] = i;
            }
            connectedComponent = n;
        }

        int root(int n) {
            if (n == par[n]) return n;
            return par[n] = root(par[n]);
        }

        boolean union(int u, int v) {
            return f_union(root(u), root(v));
        }

        boolean f_union(int u, int v) {
            if (u == v) return false;
            if (size[u] > size[v]) {
                size[u] += size[v];
                par[v] = u;
            } else {
                size[v] += size[u];
                par[u] = v;
            }
            connectedComponent--;
            return true;
        }

        DSU clone_DSU() {
            DSU t = new DSU(par.length);
            t.connectedComponent = connectedComponent;
            for (int i = 0; i < par.length; i++) {
                t.par[i] = par[i];
                t.size[i] = size[i];
            }
            return t;
        }
    }

    class segmentTree {
        long query(int cur, int l, int r, int start, int end, long tree[], long a[], long[] lazy) {
            if (l > end || r < start) return 0;
            if (lazy[cur] != 0) {
                tree[cur] += lazy[cur];
                if (l != r) {
                    lazy[2 * cur + 1] += lazy[cur];
                    lazy[2 * cur + 2] += lazy[cur];
                }
                lazy[cur] = 0;
            }
            if (l >= start && r <= end) return tree[cur];
            int mid = (l + r) >> 1;
            long p1 = query(2 * cur + 1, l, mid, start, end, tree, a, lazy);
            long p2 = query(2 * cur + 2, mid + 1, r, start, end, tree, a, lazy);
            return p1 + p2;
        }

        void build(int cur, int l, int r, long tree[], long a[]) {
            if (l == r) {
                tree[cur] = a[l];
                return;
            }
            int mid = (l + r) >> 1;
            build(2 * cur + 1, l, mid, tree, a);
            build(2 * cur + 2, mid + 1, r, tree, a);
            tree[cur] = tree[2 * cur + 1] + tree[2 * cur + 2];
        }

        void update(int cur, int start, int end, long val, int l, int r, long tree[], long a[], long[] lazy) {
            if (l > end || r < start) return;
            if (lazy[cur] != 0) {
                tree[cur] += (r - l + 1) * lazy[cur];
                if (l != r) {
                    lazy[2 * cur + 1] += lazy[cur];
                    lazy[2 * cur + 2] += lazy[cur];
                }
                lazy[cur] = 0;
            }
            if (l >= start && r <= end) {
                tree[cur] += (r - l + 1) * val;
                if (l != r) {
                    lazy[cur * 2 + 1] += val;
                    lazy[cur * 2 + 2] += val;
                }
                return;
            }
            int mid = (l + r) >> 1;
            update(2 * cur + 1, start, end, val, l, mid, tree, a, lazy);
            update(2 * cur + 2, start, end, val, mid + 1, r, tree, a, lazy);
            tree[cur] = tree[2 * cur + 1] + tree[2 * cur + 2];
        }
    }

    public void run() {
        InputReader sc = new InputReader(System.in);
        // Scanner sc=new Scanner(System.in);
        //  Random sc=new Random();
        PrintWriter out = new PrintWriter(System.out);

        int n=sc.nextInt();
        char a[]=sc.next().toCharArray();
        char last='.';
        int ans=0;
        for (int i = 0; i <n ; i++) {
            if(last!=a[i])ans++;
            last=a[i];
        }
        out.println(ans);

        out.close();
    }

}


import java.util.*;
import java.io.*;

public class Main {
    public static void main(String [] args) throws IOException{
        FastScanner sc=new FastScanner();
        PrintWriter out=new PrintWriter(System.out);
        int n=sc.nextInt();
        char [] ch=sc.next().toCharArray();
        int cnt=0;
        char p=ch[0];
        for(int i=1;i<n;i++){
            if(ch[i]!=p){
                cnt++;
                p=ch[i];
            }
        }
        cnt++;
        out.println(cnt);
        out.close();
    }
}

class FastScanner{
    private int BUFFER_SIZE = 1 << 16;

   private  DataInputStream din;

   private  byte[] buffer;

   private int bufferPointer, bytesRead;

   public FastScanner() {
       din = new DataInputStream(System.in);
       buffer = new byte[BUFFER_SIZE];
       bufferPointer = bytesRead = 0;
   }

   public FastScanner( String file_name) throws IOException {
       din = new DataInputStream(new FileInputStream(file_name));
       buffer = new byte[BUFFER_SIZE];
       bufferPointer = bytesRead = 0;
   }

   public String readLine() throws IOException {
        byte[] buf = new byte[64];
       int cnt = 0, c;
       while ((c = read()) != -1) {
           if (c == '\n')
               break;
           buf[cnt++] = (byte) c;
       }
       return new String(buf, 0, cnt);
   }

   public String next() throws IOException{

       byte c = read();
       while(Character.isWhitespace(c)){
           c = read();
       }

        StringBuilder builder = new StringBuilder();
       builder.append((char)c);
       c = read();
       while(!Character.isWhitespace(c)){
           builder.append((char)c);
           c = read();
       }

       return builder.toString();
   }

   public int nextInt() throws IOException {
       int ret = 0;
       byte c = read();
       while (c <= ' ')
           c = read();
        boolean neg = (c == '-');
       if (neg)
           c = read();
       do {
           ret = ret * 10 + c - '0';
       } while ((c = read()) >= '0' && c <= '9');

       if (neg)
           return -ret;
       return ret;
   }

   public int[] nextIntArray( int n) throws IOException {
        int arr[] = new int[n];
       for(int i = 0; i < n; i++){
           arr[i] = nextInt();
       }
       return arr;
   }

   public long nextLong() throws IOException {
       long ret = 0;
       byte c = read();
       while (c <= ' ')
           c = read();
        boolean neg = (c == '-');
       if (neg)
           c = read();
       do {
           ret = ret * 10 + c - '0';
       } while ((c = read()) >= '0' && c <= '9');
       if (neg)
           return -ret;
       return ret;
   }

   public long[] nextLongArray( int n) throws IOException {
        long arr[] = new long[n];
       for(int i = 0; i < n; i++){
           arr[i] = nextLong();
       }
       return arr;
   }

   public char nextChar() throws IOException{
       byte c = read();
       while(Character.isWhitespace(c)){
           c = read();
       }
       return (char) c;
   }

   public double nextDouble() throws IOException {
       double ret = 0, div = 1;
       byte c = read();
       while (c <= ' ')
           c = read();
        boolean neg = (c == '-');
       if (neg)
           c = read();

       do {
           ret = ret * 10 + c - '0';
       } while ((c = read()) >= '0' && c <= '9');

       if (c == '.') {
           while ((c = read()) >= '0' && c <= '9') {
               ret += (c - '0') / (div *= 10);
           }
       }

       if (neg)
           return -ret;
       return ret;
   }

   public double[] nextDoubleArray( int n) throws IOException {
        double arr[] = new double[n];
       for(int i = 0; i < n; i++){
           arr[i] = nextDouble();
       }
       return arr;
   }

   private void fillBuffer() throws IOException {
       bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
       if (bytesRead == -1)
           buffer[0] = -1;
   }

   private byte read() throws IOException {
       if (bufferPointer == bytesRead)
           fillBuffer();
       return buffer[bufferPointer++];
   }

   public void close() throws IOException {
       if (din == null)
           return;
       din.close();
   }

}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.FileInputStream;
import java.io.InputStream;

/**
 * Built using CHelper plug-in Actual solution is at the top
 *
 * @author MaxHeap
 */
public class Main {

  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    InputReader in = new InputReader(inputStream);
    PrintWriter out = new PrintWriter(outputStream);
    CSlimes solver = new CSlimes();
    solver.solve(1, in, out);
    out.close();
  }

  static class CSlimes {

    public void solve(int testNumber, InputReader in, PrintWriter out) {
      int n = in.nextInt();
      char[] s = in.next().toCharArray();
      int ans = 0;
      char last = '0';
      for (int i = 0; i < n; ++i) {
        if (s[i] != last) {
          ++ans;
        }
        last = s[i];
      }
      out.println(ans);
    }

  }

  static interface FastInput {

  }

  static class InputReader implements FastInput {

    final private int BUFFER_SIZE = 1 << 16;
    private DataInputStream din;
    private byte[] buffer;
    private int bufferPointer;
    private int bytesRead;

    public InputReader(InputStream is) {
      din = new DataInputStream(is);
      buffer = new byte[BUFFER_SIZE];
      bufferPointer = bytesRead = 0;
    }

    public InputReader(String file_name) throws IOException {
      din = new DataInputStream(new FileInputStream(file_name));
      buffer = new byte[BUFFER_SIZE];
      bufferPointer = bytesRead = 0;
    }

    public String next() {
      StringBuilder sb = new StringBuilder();
      byte c = read();
      while (c <= ' ') {
        c = read();
      }
      while (isEmptySpace(c)) {
        sb.append((char) c);
        c = read();
      }
      return sb.toString();
    }

    private boolean isEmptySpace(byte c) {
      return c != ' ' && c != '\n' && c != '\t' && c != '\r';
    }

    public int nextInt() {
      int ret = 0;
      byte c = read();
      while (c <= ' ') {
        c = read();
      }
      boolean neg = (c == '-');
      if (neg) {
        c = read();
      }
      do {
        ret = ret * 10 + c - '0';
      } while ((c = read()) >= '0' && c <= '9');

      if (neg) {
        return -ret;
      }
      return ret;
    }

    private void fillBuffer() {
      try {
        bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
      } catch (IOException e) {
        throw new RuntimeException("trying to read from null input, verify constraints ");
      }
      if (bytesRead == -1) {
        buffer[0] = -1;
      }
    }

    private byte read() {
      if (bufferPointer == bytesRead) {
        fillBuffer();
      }
      return buffer[bufferPointer++];
    }

  }
}


import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
      	String s = scn.next();
		String[] list = s.split("");
      	int count = 0;
		for(int i=0; i<n; i++){
			if(list[i].equals(list[i-1])) count++;
		}
      	System.out.println(n-count);
	}
}


import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
      	String s = scn.next();
		String[] list = s.split("");
      	int count = 0;
		for(int i=0; i<n; i++){
			if(list[i].equals(a[i-1])) count++;
		}
      	System.out.println(n-count);
	}
}


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s = sc.next();
		int count=1;
		for (int i=1;i<s.length();i++) {
			if (s.charAt(i)!=s.charAt(i-1)) {
				count ++;
			}
		}
		System.out.println(count);
	}
}


#include <cstdio>

const int MAXN=1e5+5;
char s[MAXN];

int main(){
	int n;
	scanf("%d%s",&n,s);
	int ans=0;
	char pre='\0';
	for(int i=0;i<n;++i){
		ans+=(pre!=s[i]);
		pre=s[i];
	}
	printf("%d",ans);
}


#include<stdio.h>

int main(){
    int N,ans=0;

    scanf("%d", &N);
    char S[100000];
    scanf("%s",S);
    for (int i = 0; i < N-1; i++){
        if (S[i] != S[i+1]){
            ans++;
        }
    }

    printf("%d\n",ans+1);
    return 0;
}


#pragma GCC optimize(2)
#include <bits/stdc++.h>
#define ll long long
using namespace std;

const int N = 1e5+10;
int n;
char s[N];

int main(){
    scanf("%d%s",&n,s);
    int ans = 1;
    for(int i=1;i<n;++i){
        if(s[i]!=s[i-1])    ans++;
    }

    cout << ans << '\n';
    return 0;
}


#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <set>
#include <queue>
#include <map>
#include <algorithm>
#include <utility>
#include <cmath>
using namespace std;
using ll=long long;
using pint=pair<int,int>;
#define rep(i,a,b) for(ll i=a;i<ll(b);i++)
#define repr(i,a,b) for(ll i=a;i>=ll(b);i--)
#define el '\n'
#define ALL(x) x.begin(),x.end()
#define ALLR(x) x.rbegin(),x.rend()
#define ceil_div(a,b) ((a+(b-1))/b)
#define INF 1e9
#define DEBUG(x) cout<<"debug: "<<x<<endl
#define $in(v,n) ;rep(II,0,n)cin>>v[II]
inline void IN(void){return;}
template<typename F,typename... R>inline void IN(F& f, R&... r){cin>>f;IN(r...);}
template<class T>inline bool chmin(T& a,T b){if(a>b){a=b;return 1;}return 0;}
template<class T>inline bool chmax(T& a,T b){if(a<b){a=b;return 1;}return 0;}

int main(){
    int n; string s; IN(n, s);
    int ans = 0;
    char old;
    rep(i, 0, n){
        if(s[i] != old) {
            ans++;
            old = s[i];
        }
    }
    cout << ans << el;
    return 0;
}


#include<stdio.h>
#include<iostream>
#include<string>
#include<memory>
#include<cmath>
#include<algorithm>
#include<vector>
#include<unordered_map>
double min_double(double a,double  b){
    if(a<b) return a;
    else return b;
}
void swap(int *x,int *y){
    int tmp;
    tmp=*x;
    *x=*y;
    *y=tmp;
}
int gcd(int a,int b){
    if(a<b) swap(&a,&b);
    if(b<1) return -1;

    if(a%b==0) return b;
    return gcd(b,a%b);
}
int lcm(int a,int b){
    return a * b / gcd(a,b);
}

int main(){
    int N;
    std::cin>>N;
    std::string str;
    std::cin>>str;
    int ans=0;
    for(int i=0;i<N-1;i++){
        if(str[i]!=str[i+1]) ans++;
    }
    if(str[N-1]!=str[N-2]) ans++;
    if(ans==0) ans++;
    std::cout<<ans<<std::endl;
    return 0;
}


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

int main()
{
    int n, res = 0;
    string a;
    cin >> n >> a;

    for(int i = 0; i < n - 1; ++i)
    {
        if(i == n - 2)
        {
            if(a[i] == a[i + 1])
                res++;
            else
                res += 2;
        } else if(a[i] != a[i + 1])
        {
            res++;
        }
    }
    cout << res << "\n";
    return 0;
}


#include <stdio.h>

char S[100000];

void Do(int N){
  int i, c;
  scanf("%s", S);
  c = 1;
  for(i = 1;i < N;i++) if(S[i-1] != S[i]) c++;
  printf("%d\n", c);
}

int main(void){
  int N;
  scanf("%d", &N);
  Do(N);
  return 0;
}


#include <stdio.h>
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <limits.h>
#include <math.h>
#include <assert.h>
typedef int64_t ll;
typedef uint64_t ull;
int acs(const void *a, const void *b){return *(int*)a - *(int*)b;} /* 1,2,3,4.. */
int des(const void *a, const void *b){return *(int*)b - *(int*)a;} /* 8,7,6,5.. */
#define min(a,b) (a < b ? a: b)
#define max(a,b) (a > b ? a: b)

#define MAXN (200001)
#define MOD (1000000007)

char s[MAXN+1];
int main(void)
{
    ll n;
    scanf("%ld",&n);
    scanf("%s",s);

    ll ans=1;
    for(int i=1;i<n;i++)
    {
        if(s[i]!=s[i-1]) ans++;
    }
    printf("%ld\n", ans);
    return 0;
}


#include<stdio.h>
int main(){
  int n,i,c=0;
  char s[100010];
  scanf("%d %s",&n,s);
  for(i=0;i<n;i++){
    if(s[i]==s[i+1])c++;
  }
  printf("%d\n",n-c);
  return 0;
}


#include <stdio.h>
int main(void){
  int N;
  char S[10010];
  int i;
  scanf("%d",&N);
  scanf("%s",S);
  int a=1;
  for(i=1;i<N;i++){
    if(S[i]!=S[i-1]){
      a=a+1;
    }
  }
  printf("%d",a);
  return 0;
}


#include <stdio.h>
int main(void){
  int N;
  char S[10010];
  int i;
  scanf("%d",&N);
  scanf("%s",S);
  int a=1;
  for(i=1;i<=N;i++){
    if(S[i]!=S[i-1]){
      a=a+1;
    }
  }
  printf("%d",a);
  return 0;
}


function main(input) {
    var s = input.split('\n')[1];
    var r = 1;
    for (var i = 1; i < s.length; i++)
        if (s[i - 1] !== s[i]) r++;
    console.log(r);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function Main(input) {
  var lines = input.split('\n');
  var N = Number(lines[0]);
  var S = lines[1];
  var count = 0;
  var before = '';
  for (var i = 0; i < N; i ++) {
    var current = S.charAt(i);
    if (before !== current) {
      count++;
    }
    before = current;
  }
  console.log(count);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


'use strict'
function main(inp) {
  inp = inp.trim().split('\n')
  const N = Number(inp.shift())
  inp = inp[0];

  let ans = 1
  for (let i = 1; i < N; i++) {
    if (inp[i] !== inp[i-1]) ans++
  }
  console.log(ans)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function main(input) {

    const reverse = (s) => {
        return s.split('').reverse().join('');
    }

    const N = reverse(input.split('\n')[0]);
    const S = reverse(input.split('\n')[1]);

    let ans = 1;
    for(let i=1;i<N;i++){
        if(S.charAt(i-1)!==S.charAt(i)) ans++;
    }

    console.log(ans);
}

// 下記必須
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function main(input) {
    const args = input.split('\n');
    const N = parseInt(args[0], 10),
          S = args[1];
    let s = S.split('');
    for (let i = 0; i < s.length; i++) {
        if (s[i] == s[i + 1]) s[i] = null;
    }
    console.log(s.join('').length);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function Main(input) {
  var lines = input.split('\n');
  var N = Number(lines[0]);
  var S = lines[1];
  var count = 0;
  var before = '';
  for (var i = 0; i < N; i ++) {
    var current = S.charAt(i);
    if (before !== current) {
      count++;
    }
    before = current;
  }
  console.log(count + 1);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


package main

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

func main() {

	// reader := bufio.NewReader(os.Stdin)
	// s, _ := reader.ReadString('\n')
	// n := eAtoi(strings.TrimSpace(s))
	// count := 0
	// prev := '@'
	// for i := 0; i < n; i++ {
	// 	r, _, _ := reader.ReadRune()
	// 	if prev != r {
	// 		count++
	// 	}
	// 	prev = r
	// }
	scanner := makeScanner(200000)
	eGetInt(scanner)
	s := eGetLine(scanner)
	count := 0
	prev := '@'
	for _, r := range s {
		if prev != r {
			count++
		}
		prev = r
	}
	fmt.Println(count)
}

////////////////////////////////////////////////////////////////////////////////
// ライブラリ
////////////////////////////////////////////////////////////////////////////////
func makeScanner(maxByte int) *bufio.Scanner {
	scanner := bufio.NewScanner(os.Stdin)
	scanner.Buffer(make([]uint8, 0, 8192), maxByte)
	return scanner
}
func makeCharScanner() *bufio.Scanner {
	scanner := makeScanner(8192)
	scanner.Split(bufio.ScanRunes)
	return scanner
}
func makeWordScanner() *bufio.Scanner {
	scanner := makeScanner(8192)
	scanner.Split(bufio.ScanWords)
	return scanner
}
func eGetLine(r *bufio.Scanner) string {
	if r.Scan() {
		return r.Text()
	}
	err := r.Err()
	if err != nil {
		log.Fatal(err)
	}
	// EOF
	return ""
}
func eGetInt(r *bufio.Scanner) int {
	line := eGetLine(r)
	return eAtoi(line)
}
func eGetInt64(r *bufio.Scanner) int64 {
	line := eGetLine(r)
	return eAtoInt64(line)
}
func eGetFields(r *bufio.Scanner) []string {
	line := eGetLine(r)
	return strings.Fields(line)
}
func eGetInts(r *bufio.Scanner) []int {
	fields := eGetFields(r)
	ints := make([]int, len(fields))
	for i := 0; i < len(ints); i++ {
		ints[i] = eAtoi(fields[i])
	}
	return ints
}
func eGetInt64s(r *bufio.Scanner) []int64 {
	fields := eGetFields(r)
	ints := make([]int64, len(fields))
	for i := 0; i < len(ints); i++ {
		ints[i] = eAtoInt64(fields[i])
	}
	return ints
}
func eGetChars(r *bufio.Scanner) []string {
	line := eGetLine(r)
	return strings.Split(line, "")
}
func eAtoi(s string) int {
	n, err := strconv.Atoi(s)
	if err != nil {
		log.Fatal(err)
	}
	return n
}
func eAtoInt64(s string) int64 {
	n, err := strconv.ParseInt(s, 10, 64)
	if err != nil {
		log.Fatal(err)
	}
	return n
}


package main

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

var reader = bufio.NewReaderSize(os.Stdin, 1000000)
var writer = bufio.NewWriter(os.Stdout)
func NextLine() string {
  var line, buffer []byte
  var isPrefix bool = true
  var err error
  for isPrefix {
    line, isPrefix, err = reader.ReadLine()
    if err != nil { panic(err) }
    buffer = append(buffer, line...)
  }
  return string(buffer)
}
func NextInt() int {
  var n int
  n, _ = strconv.Atoi(NextLine())
  return n
}
func Write(s interface{}) {
  fmt.Fprintln(writer, s)
}
func Output() {
  _ = writer.Flush()
}

func main() {
  N := NextInt()
  S := NextLine()
  pre := ' '
  cnt := N - N
  for _, s := range S {
    if s != pre {
      pre = s
      cnt++
    }
  }
  Write(cnt)
  Output()
}


package main

import (
	"bufio"
	"bytes"
	"fmt"
	"io"
	"os"
	"strconv"
)

// -----------------------------------------------------------------------------

// IO functions

var (
	nextToken    func() ([]byte, error)
	OutputBuffer *bufio.Writer
	OutputWriter io.Writer
)

func init() {
	// for non-interactive
	SetInput(os.Stdin)
	SetOutput(os.Stdout)

	// Enable below when interactive.  Its ok to leave above intact.
	// SetInteractive(os.Stdout, os.Stdin)
}

func SetInteractive(w io.Writer, r io.Reader) {
	SetUnbefferedInput(r)
	OutputBuffer = nil
	OutputWriter = w
}

func SetOutput(w io.Writer) {
	OutputBuffer = bufio.NewWriter(w)
	OutputWriter = OutputBuffer
}

func Flush() {
	if OutputBuffer != nil {
		OutputBuffer.Flush()
	}
}

func IsSpace(c byte) bool {
	switch c {
	case '\t', '\n', '\v', '\f', '\r', ' ':
		return true
	}
	return false
}

func SetInput(r io.Reader) {
	buf := new(bytes.Buffer)
	var b []byte

	var i int
	rest := func() ([]byte, error) {
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		if i == j {
			return nil, io.ErrUnexpectedEOF
		}
		return b[j:i], nil
	}
	initial := func() ([]byte, error) {
		io.Copy(buf, r)
		b = buf.Bytes()
		nextToken = rest
		return rest()
	}
	nextToken = initial
}

func SetUnbefferedInput(r io.Reader) {
	buf := bufio.NewReader(r)
	var b []byte

	var i int
	nextToken = func() ([]byte, error) {
		var err error
		if i == len(b) {
			b, err = buf.ReadBytes('\n')
			if err != nil {
				return nil, err
			}
			i = 0
			j := len(b) - 1
			for 0 <= j && IsSpace(b[j]) {
				j--
			}
			b = b[0 : j+1]
		}
		for i < len(b) && IsSpace(b[i]) {
			i++
		}
		j := i
		for i < len(b) && !IsSpace(b[i]) {
			i++
		}
		if i == j {
			return nil, io.ErrUnexpectedEOF
		}
		return b[j:i], nil
	}
}

func readb() []byte {
	b, err := nextToken()
	if err != nil {
		panic(err)
	}
	return b
}
func reads() string {
	return string(readb())
}

func readll() int64 {
	i, err := strconv.ParseInt(reads(), 10, 64)
	if err != nil {
		panic(err.Error())
	}
	return i
}

func readi() int {
	return int(readll())
}

func readf() float64 {
	f, err := strconv.ParseFloat(reads(), 64)
	if err != nil {
		panic(err.Error())
	}
	return f
}

func printf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(OutputWriter, f, args...)
}

func println(args ...interface{}) (int, error) {
	return fmt.Fprintln(OutputWriter, args...)
}

func eprintf(f string, args ...interface{}) (int, error) {
	return fmt.Fprintf(os.Stderr, f, args...)
}

func eprintln(args ...interface{}) (int, error) {
	return fmt.Fprintln(os.Stderr, args...)
}

// -----------------------------------------------------------------------------

// Simple math functions

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func min64(a, b int64) int64 {
	if a < b {
		return a
	}
	return b
}

func max(a, b int) int {
	if a < b {
		return b
	}
	return a
}

func max64(a, b int64) int64 {
	if a < b {
		return b
	}
	return a
}

func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}

func abs64(a int64) int64 {
	if a < 0 {
		return -a
	}
	return a
}

func gcd(a, b int) int {
	if b == 0 {
		return a
	}
	return gcd(b, a%b)
}

func gcd64(a, b int64) int64 {
	if b == 0 {
		return a
	}
	return gcd64(b, a%b)
}

func main() {
	defer Flush()
	_ = readi()
	S := readb()

	var ans int
	ans = 1
	for i := 1; i < len(S); i++ {
		if S[i-1] != S[i] {
			ans++
		}
	}
	println(ans)

}


package main

import (
	"fmt"
	//"math"
)

var S string
var ANS int
func main() {
	fmt.Scan(&S)
	s := string(0)
	for i := 0; i < len(S); i++ {
		v := S[i:i+1]
		if s != v {
			ANS++
			s = v
		}
	}
	fmt.Println(ANS)
}


package main

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

var sc = bufio.NewScanner(os.Stdin)

func readInt() int {
	sc.Scan()
	i, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic(err)
	}
	return i
}

func readString() string {
	sc.Scan()
	return sc.Text()
}

func readInt64() int64 {
	sc.Scan()
	i, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic(err)
	}
	return int64(i)
}

func readfloat64() float64 {
	sc.Scan()
	i, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic(err)
	}
	return float64(i)
}

func abs(a int) int {
	if a < 0 {
		return a * -1
	}
	return a
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func main() {
	sc.Split(bufio.ScanWords)
	n := readInt()
	s := []byte(readString())

	count := 1
	for i := 0; i < n-1; i++ {
		if s[i] != s[i+1] {
			count++
		}
	}
	fmt.Println(count)
}


package main

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

var sc = bufio.NewScanner(os.Stdin)

func readInt() int {
	sc.Scan()
	i, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic(err)
	}
	return i
}

func readString() string {
	sc.Scan()
	return sc.Text()
}

func readInt64() int64 {
	sc.Scan()
	i, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic(err)
	}
	return int64(i)
}

func readfloat64() float64 {
	sc.Scan()
	i, err := strconv.Atoi(sc.Text())
	if err != nil {
		panic(err)
	}
	return float64(i)
}

func abs(a int) int {
	if a < 0 {
		return a * -1
	}
	return a
}

func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}

func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

func main() {
	sc.Split(bufio.ScanWords)
	n := readInt()
	s := readString()

	count := 1
	for i := 0; i < n-1; i++ {
		if s[i] != s[i+1] {
			count++
		}
	}
	fmt.Println(count)
}


n = gets.to_i
s = gets.chomp

puts s.squeeze.length


gets.to_i
s = gets.chomp
puts s.squeeze.size


N = gets.to_i
S = gets.chomp

puts S.squeeze.size


n = gets.chomp.to_i
s = gets.chomp.split("")
i = 0
kazu = n
arr = [s[0]]
while true
    if s[i] == s[i+1]
        kazu = kazu - 1
    end
    if i == n - 2
        break
    end
    i += 1
end
puts kazu


n = gets.chomp.to_i
s = gets.chomp.split("")
i = 0
arr = [s[0]]
while true
    if s[i] != s[i+1]
        arr << s[i+1]
    end
    if i == n - 2
        break
    end
    i += 1
end
puts arr.size


s = gets.chomp.to_i

ans = 1
s.each do |i|
    if s[0] != i
        ans += 1
        s[0] = i
    end
end

puts ans


fn main() {
    let n = read::<usize>();
    let s = read::<String>();
    let s: Vec<char> = s.chars().into_iter().collect();
    let mut ret = 0;
    for i in 0..n {
        if i == 0 {
            ret += 1;
            continue;
        }

        if s[i-1] == s[i] {
            continue;
        }

        ret += 1;
    }

    println!("{}", ret);
}

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().parse().ok().unwrap()
}


#![allow(unused_macros, deprecated)]

#[allow(dead_code)]
mod utils {
    use std::io::{
        self, BufRead, BufReader, BufWriter, Seek, SeekFrom, Stdin, StdinLock, Stdout, StdoutLock,
        Write,
    };
    use std::mem;
    use std::ops::{Deref, DerefMut};
    use std::ptr;
    use std::slice;
    use std::str::{self, FromStr};

    #[inline]
    fn is_space_or_line_break(b: &u8) -> bool {
        *b == b' ' || *b == b'\n'
    }

    pub struct Scanner<R: BufRead> {
        reader: R,
        buf: Vec<u8>,
    }

    impl<R: BufRead> Scanner<R> {
        #[inline]
        pub fn new(reader: R) -> Scanner<R> {
            Scanner {
                reader: reader,
                buf: Vec::with_capacity(100),
            }
        }

        pub fn read<T: FromStr>(&mut self) -> T {
            self.read_until(is_space_or_line_break);
            self.parse()
        }

        pub fn read2<T1: FromStr, T2: FromStr>(&mut self) -> (T1, T2) {
            (self.read(), self.read())
        }

        pub fn read3<T1: FromStr, T2: FromStr, T3: FromStr>(&mut self) -> (T1, T2, T3) {
            (self.read(), self.read(), self.read())
        }

        pub fn read4<T1: FromStr, T2: FromStr, T3: FromStr, T4: FromStr>(
            &mut self,
        ) -> (T1, T2, T3, T4) {
            (self.read(), self.read(), self.read(), self.read())
        }

        pub fn reads(&mut self) -> &str {
            self.read_until(is_space_or_line_break);
            unsafe { str::from_utf8_unchecked(&self.buf) }
        }

        pub fn readl(&mut self) -> &str {
            self.buf.clear();
            self.reader.read_until(b'\n', &mut self.buf).unwrap();
            let bytes = if self.buf.last() == Some(&b'\n') {
                &self.buf[..self.buf.len() - 1]
            } else {
                &self.buf
            };
            unsafe { str::from_utf8_unchecked(&bytes) }
        }

        pub fn read_vec<T: FromStr>(&mut self, count: usize) -> Vec<T> {
            (0..count).map(|_| self.read()).collect()
        }

        fn read_until<P: FnMut(&u8) -> bool>(&mut self, mut predicate: P) {
            self.buf.clear();
            let mut first = true;

            // https://doc.rust-lang.org/src/std/io/mod.rs.html#1623-1649
            loop {
                let (done, used) = {
                    let available = self.reader.fill_buf().unwrap();
                    if first && available.len() == 0 {
                        panic!("Scan Error (EOF reached)");
                    }

                    match available.iter().position(&mut predicate) {
                        Some(0) if first => (false, 1),
                        Some(i) => {
                            self.buf.extend_from_slice(&available[..i]);
                            (true, i + 1)
                        }
                        None => {
                            self.buf.extend_from_slice(available);
                            (false, available.len())
                        }
                    }
                };

                self.reader.consume(used);
                if done || used == 0 {
                    return;
                }

                first = false;
            }
        }

        #[inline]
        fn parse<T: FromStr>(&mut self) -> T {
            // 文字列をT型へパースする
            let elem = unsafe { str::from_utf8_unchecked(&self.buf) };
            elem.parse()
                .unwrap_or_else(|_| panic!(format!("failed parsing: {}", elem)))
        }
    }

    impl<R: BufRead + Seek> Seek for Scanner<R> {
        #[inline]
        fn seek(&mut self, pos: SeekFrom) -> io::Result<u64> {
            self.reader.seek(pos)
        }
    }

    pub struct StdinScanner {
        stdin: Stdin,
        scanner: Scanner<BufReader<StdinLock<'static>>>,
    }

    impl StdinScanner {
        #[inline]
        pub fn new() -> StdinScanner {
            let stdin = io::stdin();
            let stdinlock = unsafe { mem::transmute(stdin.lock()) };
            let reader = BufReader::with_capacity(4096, stdinlock);
            let scanner = Scanner::new(reader);
            StdinScanner {
                stdin: stdin,
                scanner: scanner,
            }
        }
    }

    impl Deref for StdinScanner {
        type Target = Scanner<BufReader<StdinLock<'static>>>;

        #[inline]
        fn deref(&self) -> &Self::Target {
            &self.scanner
        }
    }

    impl DerefMut for StdinScanner {
        #[inline]
        fn deref_mut(&mut self) -> &mut Self::Target {
            &mut self.scanner
        }
    }

    pub struct StdoutWriter {
        stdout: Stdout,
        writer: BufWriter<StdoutLock<'static>>,
    }

    impl StdoutWriter {
        #[inline]
        pub fn new() -> StdoutWriter {
            let stdout = io::stdout();
            let stdoutlock = unsafe { mem::transmute(stdout.lock()) };
            let writer = BufWriter::with_capacity(4096, stdoutlock);
            StdoutWriter {
                stdout: stdout,
                writer: writer,
            }
        }

        pub fn write<T: Writable>(&mut self, v: T) {
            v.display(&mut self.writer);
        }

        pub fn writeln<T: Writable>(&mut self, v: T) {
            v.display(&mut self.writer);
            self.writer.write_all(b"\n").unwrap();
        }

        pub fn write_horizontal<I>(&mut self, iter: I)
        where
            I: IntoIterator,
            I::Item: Writable,
        {
            let mut it = iter.into_iter();
            if let Some(elem) = it.next() {
                elem.display(&mut self.writer);
            } else {
                return;
            }

            for elem in it {
                elem.display(&mut self.writer);
                self.writer.write_all(b" ").unwrap();
            }
        }

        pub fn write_vertical<I>(&mut self, iter: I)
        where
            I: IntoIterator,
            I::Item: Writable,
        {
            let mut it = iter.into_iter();
            if let Some(elem) = it.next() {
                elem.display(&mut self.writer);
            } else {
                return;
            }

            for elem in it {
                elem.display(&mut self.writer);
                self.writer.write_all(b"\n").unwrap();
            }
        }
    }

    impl Write for StdoutWriter {
        #[inline]
        fn flush(&mut self) -> io::Result<()> {
            self.writer.flush()
        }

        #[inline]
        fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
            self.writer.write(buf)
        }
    }

    static DEC_DIGITS_LUT: &'static [u8; 200] = b"0001020304050607080910111213141516171819\
            2021222324252627282930313233343536373839\
            4041424344454647484950515253545556575859\
            6061626364656667686970717273747576777879\
            8081828384858687888990919293949596979899";

    fn write_int<W: Write>(mut writer: W, mut n: u64, is_negative: bool) {
        unsafe {
            let mut buf: [u8; 39] = mem::uninitialized();
            let buf_ptr_start = buf.as_mut_ptr().offset(39);
            let mut buf_ptr = buf_ptr_start;
            let lut_ptr = DEC_DIGITS_LUT.as_ptr();

            while n >= 10000 {
                let rem = (n % 10000) as isize;
                n /= 10000;

                let d1 = (rem / 100) << 1;
                let d2 = (rem % 100) << 1;
                buf_ptr = buf_ptr.offset(-4);
                ptr::copy_nonoverlapping(lut_ptr.offset(d1), buf_ptr, 2);
                ptr::copy_nonoverlapping(lut_ptr.offset(d2), buf_ptr.offset(2), 2);
            }

            let mut n = n as isize; // possibly reduce 64bit math

            // decode 2 more chars, if > 2 chars
            if n >= 100 {
                let d1 = (n % 100) << 1;
                n /= 100;
                buf_ptr = buf_ptr.offset(-2);
                ptr::copy_nonoverlapping(lut_ptr.offset(d1), buf_ptr, 2);
            }

            // decode last 1 or 2 chars
            if n < 10 {
                buf_ptr = buf_ptr.offset(-1);
                *buf_ptr = (n as u8) + b'0';
            } else {
                let d1 = n << 1;
                buf_ptr = buf_ptr.offset(-2);
                ptr::copy_nonoverlapping(lut_ptr.offset(d1), buf_ptr, 2);
            }

            if is_negative {
                buf_ptr = buf_ptr.offset(-1);
                *buf_ptr = b'-';
            }

            let buf_slice =
                slice::from_raw_parts(buf_ptr, buf_ptr_start as usize - buf_ptr as usize);

            writer.write_all(buf_slice).unwrap();
        }
    }

    pub trait Writable {
        fn display<W: Write>(&self, writer: &mut W);
    }

    impl Writable for str {
        #[inline]
        fn display<W: Write>(&self, writer: &mut W) {
            writer.write_all(self.as_bytes()).unwrap()
        }
    }

    impl<'a> Writable for &'a str {
        #[inline]
        fn display<W: Write>(&self, writer: &mut W) {
            writer.write_all(self.as_bytes()).unwrap()
        }
    }

    impl Writable for String {
        #[inline]
        fn display<W: Write>(&self, writer: &mut W) {
            writer.write_all(self.as_bytes()).unwrap()
        }
    }

    impl Writable for bool {
        #[inline]
        fn display<W: Write>(&self, writer: &mut W) {
            let s = if *self { "Yes" } else { "No" };
            writer.write_all(s.as_bytes()).unwrap();
        }
    }

    macro_rules! impl_writable_int {
        ($($int:ty)*) => {
            $(
                impl Writable for $int {
                    #[allow(unused_comparisons)]
                    fn display<W: Write>(&self, writer: &mut W) {
                        let is_negative = !(*self >= 0);
                        let abs = if is_negative {
                            (!*self as u64).wrapping_add(1)
                        } else {
                            *self as u64
                        };
                        write_int(writer, abs, is_negative);
                    }
                }
            )*
        };
    }

    macro_rules! impl_writable_float {
        ($($float:ty)*) => {
            $(
                impl Writable for $float {
                    #[inline]
                    fn display<W: Write>(&self, writer: &mut W) {
                        write!(writer, "{}", *self).unwrap();
                    }
                }
            )*
        }
    }

    impl_writable_int!(u8 u16 u32 u64 usize i8 i16 i32 i64 isize);
    impl_writable_float!(f32 f64);

    pub static mut SCANNER: *mut StdinScanner = 0 as *mut StdinScanner;
    pub static mut WRITER: *mut StdoutWriter = 0 as *mut StdoutWriter;

    #[inline]
    pub fn atcoder_initialize() {
        unsafe {
            SCANNER = mem::transmute(Box::new(StdinScanner::new()));
            WRITER = mem::transmute(Box::new(StdoutWriter::new()));
        }
    }

    #[inline]
    pub fn atcoder_finish() {
        unsafe {
            (*WRITER).flush().unwrap();
        }
    }
}

macro_rules! input {
    () => {};
    (@scanner $scanner:ident, @pred [ $($pred:tt)* ], ($var1:tt, $var2:tt) : [($t1:tt, $t2:tt) ; $len:expr]) => {
        let mut $var1 = Vec::with_capacity($len as usize);
        let mut $var2 = Vec::with_capacity($len as usize);

        for _ in 0..$len {
            $var1.push(scan!($scanner, $t1));
            $var2.push(scan!($scanner, $t2));
        }
    };
    (@scanner $scanner:ident, @pred [ $($pred:tt)* ], $var:tt : $t:tt) => {
        let $($pred)* $var = scan!($scanner, $t);
    };
    (@scanner $scanner:ident,) => {};
    (@scanner $scanner:ident, $var:tt : $t:tt) => {
        input!(@scanner $scanner, @pred [], $var : $t);
    };
    (@scanner $scanner:ident, mut $var:tt : $t:tt) => {
        input!(@scanner $scanner, @pred [mut], $var : $t);
    };
    (@scanner $scanner:ident, $var:tt : $t:tt, $($r:tt)*) => {
        input!(@scanner $scanner, $var : $t);
        input!(@scanner $scanner, $($r)*);
    };
    (@scanner $scanner:ident, mut $var:tt : $t:tt, $($r:tt)*) => {
        input!(@scanner $scanner, mut $var : $t);
        input!(@scanner $scanner, $($r)*);
    };
    ($($r:tt)*) => {
        let scanner_ref = unsafe { &mut *$crate::utils::SCANNER };
        input!(@scanner scanner_ref, $($r)*);
    }
}

macro_rules! scan {
    ($scanner:ident, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| scan!($scanner, $t)).collect::<Vec<_>>()
    };
    ($scanner:ident, usize1) => {
        scan!($scanner, usize) - 1
    };
    ($scanner:ident, line) => {
        $scanner.readl().to_string()
    };
    ($scanner:ident, $t:ty) => {
        $scanner.read::<$t>()
    };
}

macro_rules! pprint {
    ($value:expr) => {
        unsafe {
            (*$crate::utils::WRITER).write($value);
        }
    };
    ($value:expr, $($r:tt)*) => {
        let writer = unsafe { &mut *$crate::utils::WRITER };
        writer.write($value);
        writer.write(" ");
        pprint!($($r)*);
    };
}

macro_rules! pprintln {
    ($value:expr) => {
        unsafe {
            (*$crate::utils::WRITER).writeln($value);
        }
    };
    ($value:expr, $($r:tt)*) => {
        let writer = unsafe { &mut *$crate::utils::WRITER };
        writer.write($value);
        writer.write(" ");
        pprintln!($($r)*);
    };
}

macro_rules! atcoder_main {
    ($func:ident) => {
        fn main() {
            $crate::utils::atcoder_initialize();
            $func();
            $crate::utils::atcoder_finish();
        }
    };
}

macro_rules! debug {
    ($e:expr) => {
        #[cfg(not(debug_assertions))]
        dbg!($e)
    }
}

fn run() {
    input! {
        n: usize,
        s: line
    }

    let mut s = s.into_bytes();
    s.dedup();

    pprintln!(s.len());
}

atcoder_main!(run);


fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn main() {
    let n = read::<usize>();
    let s = read::<String>();
    let s = s.chars().collect::<Vec<_>>();

    let mut prev = '.';
    let mut count = 0;
    for &c in s.iter() {
        if prev != c {
            prev = c;
            count += 1;
        }
    }

    println!("{}", count);
}


#![allow(unused_imports)]
#![allow(non_snake_case)]
use std::cmp::*;
use std::collections::*;
use std::io::Write;

#[allow(unused_macros)]
macro_rules! debug {
    ($($e:expr),*) => {
        #[cfg(debug_assertions)]
        $({
            let (e, mut err) = (stringify!($e), std::io::stderr());
            writeln!(err, "{} = {:?}", e, $e).unwrap()
        })*
    };
}

fn main() {
    let v = read_vec::<usize>();
    let (n, m, q) = (v[0], v[1], v[2]);
    let mut edges = vec![vec![]; n];
    let mut uft = UnionFindTree::new(n);
    for _ in 0..m {
        let v = read_vec::<usize>();
        let (a, b) = (v[0] - 1, v[1] - 1);
        edges[a].push(b);
        edges[b].push(a);
        uft.unite(a, b);
    }
    let mut used = vec![0; n];
    let mut same_pairs = HashMap::new();
    for _ in 0..q {
        let v = read_vec::<usize>();
        let (a, b) = (v[0] - 1, v[1] - 1);
        if uft.same(a, b) {
            same_pairs.entry(uft.find(a)).or_insert(vec![]).push((a, b));
        } else {
            used[a] += 1;
            used[b] += 1;
        }
    }

    let mut roots = HashSet::new();
    for i in 0..n {
        roots.insert(uft.find(i));
    }
    let mut weights = vec![0; n];
    let mut accum_num = vec![0; n];
    let mut ans = 0;
    let mut tree: Vec<Vec<usize>> = vec![Vec::new(); n];

    for root in roots {
        make_tree(root, n, &edges, &mut tree);
        let mut topological_sorted_indexes = vec![root];
        topological_dfs(root, &tree, &mut topological_sorted_indexes);
        for &ti in topological_sorted_indexes.iter().rev() {
            for &ci in tree[ti].iter() {
                accum_num[ti] += accum_num[ci];
                weights[ti] += weights[ci];
            }
            accum_num[ti] += used[ti];
            weights[ti] += accum_num[ti];
        }

        let mut cost = tree[root].iter().map(|&x| weights[x]).sum::<i64>();
        let mut cur = root;
        let mut parent_gain = 0;

        loop {
            if tree[cur].is_empty() {
                break;
            }

            let mut max_idx = root;
            let mut max_gain = 0;
            for &ci in tree[cur].iter() {
                if accum_num[ci] > max_gain {
                    max_idx = ci;
                    max_gain = accum_num[ci];
                    break;
                }
            }
            let focused_accum_nums_sum = tree[cur].iter().map(|&ci| accum_num[ci]).sum::<i64>();
            let other_weight = focused_accum_nums_sum - max_gain + parent_gain;
            let lost_weight = other_weight + used[cur];
            if lost_weight >= max_gain {
                break;
            }
            cost -= max_gain - lost_weight;
            parent_gain += lost_weight;
            cur = max_idx;
        }
        ans += cost;

        if same_pairs.contains_key(&root) {
            let lca = LCA::with_root(root, &tree);
            for &(a, b) in same_pairs[&root].iter() {
                let ca = lca.lca(a, b);
                ans += (lca.depth[a] + lca.depth[b] - lca.depth[ca]) as i64;
            }
        }
    }
    println!("{}", ans);
}

pub struct LCA {
    pub depth: Vec<usize>,
    pub parent: Vec<Vec<Option<usize>>>,
}

impl LCA {
    pub fn new(g: &[Vec<usize>]) -> LCA {
        LCA::with_root(0, g)
    }

    pub fn with_root(root: usize, g: &[Vec<usize>]) -> LCA {
        fn dfs(
            i: usize,
            p: Option<usize>,
            d: usize,
            g: &[Vec<usize>],
            depth: &mut [usize],
            parent: &mut [Vec<Option<usize>>],
        ) {
            parent[i][0] = p;
            depth[i] = d;

            for &t in &g[i] {
                if Some(t) != p {
                    dfs(t, Some(i), d + 1, g, depth, parent);
                }
            }
        }
        let n = g.len();
        let l2 = (1..).find(|i| 1usize << i > n).unwrap();
        let mut depth = vec![0; n];
        let mut parent = vec![vec![None; l2 + 1]; n];

        dfs(root, None, 0, &g, &mut depth, &mut parent);

        for i in 1..l2 + 1 {
            for j in 0..n {
                if let Some(p) = parent[j][i - 1] {
                    parent[j][i] = parent[p][i - 1];
                }
            }
        }

        LCA {
            depth: depth,
            parent: parent,
        }
    }

    pub fn lca(&self, mut a: usize, mut b: usize) -> usize {
        use std::mem::swap;
        if self.depth[b] < self.depth[a] {
            swap(&mut a, &mut b);
        }

        while self.depth[a] != self.depth[b] {
            b = self.parent[b][(self.depth[b] - self.depth[a]).trailing_zeros() as usize].unwrap();
        }

        if a == b {
            return a;
        }

        for i in (0..self.parent[0].len()).rev() {
            if self.parent[a][i] != self.parent[b][i] {
                a = self.parent[a][i].unwrap();
                b = self.parent[b][i].unwrap();
            }
        }
        self.parent[a][0].unwrap()
    }
}

fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}

fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}

fn make_tree(
    cur_idx: usize,
    parent_idx: usize,
    edges: &Vec<Vec<usize>>,
    tree: &mut Vec<Vec<usize>>,
) {
    for child_idx in edges[cur_idx].iter() {
        if *child_idx == parent_idx {
            continue;
        }
        tree[cur_idx].push(*child_idx);
        make_tree(*child_idx, cur_idx, edges, tree);
    }
}

fn topological_dfs(cur_idx: usize, tree: &Vec<Vec<usize>>, result: &mut Vec<usize>) {
    for child_idx in tree[cur_idx].iter() {
        result.push(*child_idx);
        topological_dfs(*child_idx, tree, result);
    }
}

#[derive(Debug, Clone)]
struct UnionFindTree {
    parent: Vec<isize>,
    size: Vec<usize>,
    height: Vec<u64>,
}

impl UnionFindTree {
    fn new(n: usize) -> UnionFindTree {
        UnionFindTree {
            parent: vec![-1; n],
            size: vec![1usize; n],
            height: vec![0u64; n],
        }
    }

    fn find(&mut self, index: usize) -> usize {
        if self.parent[index] == -1 {
            return index;
        }
        let idx = self.parent[index] as usize;
        let ret = self.find(idx);
        self.parent[index] = ret as isize;
        ret
    }

    fn same(&mut self, x: usize, y: usize) -> bool {
        self.find(x) == self.find(y)
    }

    fn get_size(&mut self, x: usize) -> usize {
        let idx = self.find(x);
        self.size[idx]
    }

    fn unite(&mut self, index0: usize, index1: usize) -> bool {
        let a = self.find(index0);
        let b = self.find(index1);
        if a == b {
            false
        } else {
            if self.height[a] > self.height[b] {
                self.parent[b] = a as isize;
                self.size[a] += self.size[b];
            } else if self.height[a] < self.height[b] {
                self.parent[a] = b as isize;
                self.size[b] += self.size[a];
            } else {
                self.parent[b] = a as isize;
                self.size[a] += self.size[b];
                self.height[a] += 1;
            }
            true
        }
    }
}


#[allow(dead_code)]
fn read<T: std::str::FromStr>() -> T {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).ok();
    s.trim().parse().ok().unwrap()
}
#[allow(dead_code)]
fn read_vec<T: std::str::FromStr>() -> Vec<T> {
    read::<String>()
        .split_whitespace()
        .map(|e| e.parse().ok().unwrap())
        .collect()
}
#[allow(dead_code)]
fn read_vec2<T: std::str::FromStr>(n: u32) -> Vec<Vec<T>> {
    (0..n).map(|_| read_vec()).collect()
}
#[allow(dead_code)]
fn yn(result: bool) {
    if result {
        println!("Yes");
    } else {
        println!("No");
    }
}

fn main() {
    let n = read::<usize>();
    let s = read::<String>().chars().collect::<Vec<char>>();

    let mut v: Vec<char> = vec![];
    let mut lastchar = ' ';
    for i in 0..n {
        let c = s[i];
        if i !=0 && lastchar != c {
            v.push(c);
            lastchar = c;
        }
    }
    println!("{}", v.len());
}


use std::io::*;
use std::str::FromStr;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main(){
    let _: i32 = read();
    let s: String = read();

    let mut last_char = 'A';
    let mut ans: i32 = 0;
    s.chars().for_each(|c| if c != last_char { ans += 1; last_char = c; } );

    println!("{}", ans);
}


let N = Int(readLine()!)!
let S = readLine()!.characters
var pre: Character = "_"
var ans = 0
for c in S {
  ans += (c == pre ? 0 : 1)
  pre = c
}
print(ans)


// 🐋💭 Walk on Multiplication Table
import Foundation

func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func readInt() -> Int {
    return Int(readLine()!)!
}

///最大公約数を返す
func gcd(_ m:Int, _ n:Int) -> Int {
    if n == 0 {return m}
    return gcd(n, m % n)
}

///素数判定(試し割り)
func isPrime(_ x:Int) -> Bool {
    if x <= 1 || x % 2 == 0 { return false }
    if x == 2 { return true }
    for i in stride(from: 3, to: Int(ceil(sqrt(Double(x)))), by: 2){
        if x % i == 0 {
            return false
        }
    }
    return true
}

//https://program-life.com/669
///実行速度の計測
func exectionTime(action: () -> Void) {
    let startDate = Date()
    action()
    let endDate = Date()
    print(endDate.timeIntervalSince(startDate))
}
// https://melheaven.hatenadiary.jp/entry/atcoder144
///約数の配列を返す
func makeDivisors(_ n:Int) -> [Int] {
    var divisors = [Int]()
    for i in 1..<Int(pow(Double(n), 0.5)) + 1 {
        if n % i == 0{
            divisors.append(i + n / i)
        }
    }

    return divisors
}

func main() {
    let n = readInt()
    let aryS = readLine()!.map { String($0) }
    var ans = n
    for i in 1..<n {
        if aryS[i - 1] == aryS[i] {
            ans -= 1
        }
    }
    print(ans)
}
main()


readLine()
var ans=0,pre:Character="_"
readLine()!.characters.map{
  ans+=($0==pre ?0:1)
  pre=$0
}
print(ans)


// 🐋💭 Walk on Multiplication Table
import Foundation

func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func readInt() -> Int {
    return Int(readLine()!)!
}

///最大公約数を返す
func gcd(_ m:Int, _ n:Int) -> Int {
    if n == 0 {return m}
    return gcd(n, m % n)
}

///素数判定(試し割り)
func isPrime(_ x:Int) -> Bool {
    if x <= 1 || x % 2 == 0 { return false }
    if x == 2 { return true }
    for i in stride(from: 3, to: Int(ceil(sqrt(Double(x)))), by: 2){
        if x % i == 0 {
            return false
        }
    }
    return true
}

//https://program-life.com/669
///実行速度の計測
func exectionTime(action: () -> Void) {
    let startDate = Date()
    action()
    let endDate = Date()
    print(endDate.timeIntervalSince(startDate))
}
// https://melheaven.hatenadiary.jp/entry/atcoder144
///約数の配列を返す
func makeDivisors(_ n:Int) -> [Int] {
    var divisors = [Int]()
    for i in 1..<Int(pow(Double(n), 0.5)) + 1 {
        if n % i == 0{
            divisors.append(i + n / i)
        }
    }

    return divisors
}

func main() {
    let n = readInt()
    let aryS = readLine()!.map { String($0) }
    var SCount = 0
    var ans = n
    for i in 1..<n {
        if aryS[i - 1] == aryS[i] {
            SCount += 1
        } else if SCount > 0 {
            ans -= SCount
            SCount = 0
        }
    }
    print(ans)
}
main()


// 🐋💭 Walk on Multiplication Table
import Foundation

func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}

func readInt() -> Int {
    return Int(readLine()!)!
}

///最大公約数を返す
func gcd(_ m:Int, _ n:Int) -> Int {
    if n == 0 {return m}
    return gcd(n, m % n)
}

///素数判定(試し割り)
func isPrime(_ x:Int) -> Bool {
    if x <= 1 || x % 2 == 0 { return false }
    if x == 2 { return true }
    for i in stride(from: 3, to: Int(ceil(sqrt(Double(x)))), by: 2){
        if x % i == 0 {
            return false
        }
    }
    return true
}

//https://program-life.com/669
///実行速度の計測
func exectionTime(action: () -> Void) {
    let startDate = Date()
    action()
    let endDate = Date()
    print(endDate.timeIntervalSince(startDate))
}
// https://melheaven.hatenadiary.jp/entry/atcoder144
///約数の配列を返す
func makeDivisors(_ n:Int) -> [Int] {
    var divisors = [Int]()
    for i in 1..<Int(pow(Double(n), 0.5)) + 1 {
        if n % i == 0{
            divisors.append(i + n / i)
        }
    }

    return divisors
}

func main() {
    let n = readInt()
    let aryS = readLine()!.map { String($0) }
    var SCount = 0
    var ans = n
    for i in 1..<n {
        print(aryS[i - 1],aryS[i])
        if aryS[i - 1] == aryS[i] {
            SCount += 1
        } else if SCount > 0 {
            ans -= SCount
            SCount = 0
        }
    }
    print(ans)
}
main()


import * as fs from "fs";

const input = fs.readFileSync("/dev/stdin", "utf8").split(/\n/);
const N: number = +input[0];
const strings = input[1];
let count = 0;
for (let i = 0; i < N; i++) {
  if (strings[i] !== strings[i + 1]) {
    count++;
  }
}
console.log(count);


const main = (input) => {
  const [nStr, s] = input.split('\n')
  const n = Number(nStr)
  let result = 1
  for (let i = 1; i < n; i++) {
    const pre = s[i-1]
    const char = s[i]
    if (pre !== char) result++
  }
  console.log(result)

}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))


const input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);const tn=():number=>{const a=input[0];input.shift();return Number(a)};const tnn=(n:number):number[]=>{const a=[];for(let i=0;i<n;i++){a.push(tn())}return a};const ts=():string=>{const a=input[0];input.shift();return String(a)};const tss=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(ts())}return a};const tc=():string=>{let a=input[0].split('');const b=a[0];a.shift();if(a.length>0){input[0]=a.join('')}else{input.shift()}return String(b)};const tcc=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(tc())}return a};const to=(...arg)=>{console.log(...arg)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const floor=(a)=>{return Math.floor(a)};const ceil=(a)=>{return Math.ceil(a)};const asc=(ar:number[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.sort((a,b)=>{return b-a})};const sw=(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length;i+=2){if(eval(a+op+arr[i]))return arr[i+1];}return arr[arr.length-1]};const near=(n:number,arr:number[]):number=>{let ne=arr[0],ni=0;for(let i=1;i<arr.length;i++){if(Math.abs(n-ne)>Math.abs(n-arr[i])){ne=arr[i];ni=i}}return ni};const gojo=(a:number,b:number):number=>{if(a%b===0)return b;return gojo(b,a%b)};const deduplicate=(a:number[])=>{return Array.from(new Set(a))};const permutation=(arr,n)=>{var arrs,i,j,zensu,results,parts;arrs=[];zensu=arr.length;if(zensu<n){return}else if(n==1){for(i=0;i<zensu;i++){arrs[i]=[arr[i]]}}else{for(i=0;i<zensu;i++){parts=arr.slice(0);parts.splice(i,1)[0];results=permutation(parts,n-1);for(j=0;j<results.length;j++){arrs.push([arr[i]].concat(results[j]))}}}return arrs}
const main=()=>{
  let n=tn(),ans=0
  let sr=ts()
  let b=null
  for(let i=0;i<n;i++){
    let s=sr[i]
    ans+=s!=b?1:0
    b=s
  }
  to(ans)
}
main()


import * as fs from "fs";

function main(lines: string[][]) {
  const slimes = lines[1][0].split("");
  const unique = (data: string[]): string[] => {
    return data.reduce((prev, cur) => {
      if (prev[prev.length - 1] !== cur) {
        return prev.concat(cur);
      } else {
        return prev;
      }
    }, []);
  };
  const uniqueData = unique(slimes);
  console.log(uniqueData.length);
}

const lines = fs
  .readFileSync("/dev/stdin", "utf8")
  .split("\n")
  .map((l) => l.split(" "))
  .filter((input) => !(input.length === 1 && input[0] === ""));

main(lines);


import * as fs from "fs";

function main(lines: string[][]) {
  const slimes = lines[1][0].split("");
  const unique = (data: string[]): { uniqueData: string[]; removed: boolean } => {
    let removed = false;
    let latest = "";
    const uniqueData = data.reduce((prev, cur) => {
      if (latest !== cur) {
        latest = cur;
        return prev.concat(cur);
      } else {
        removed = true;
        latest = cur;
        return prev;
      }
    }, []);

    if (removed) {
      const reRemoved = unique(uniqueData);
      return { uniqueData: reRemoved.uniqueData, removed: reRemoved.removed };
    }
    return { uniqueData, removed };
  };
  const { uniqueData, removed } = unique(slimes);
  console.log(uniqueData.length);
}

const lines = fs
  .readFileSync("/dev/stdin", "utf8")
  .split("\n")
  .map((l) => l.split(" "))
  .filter((input) => !(input.length === 1 && input[0] === ""));

main(lines);


import * as fs from "fs";

const input = fs.readFileSync("/dev/stdin", "utf8").split(/\n/);
const N: number = +input[0];
const strings = input[1].split(" ");
let count = 0;
for (let i = 0; i < N; i++) {
  if (strings[i] !== strings[i + 1]) {
    count++;
  }
}
console.log(count);


X1, Y1, X2, Y2 = map(int, input().split())
X3, Y3 = X2-(Y2-Y1), Y2+(X2-X1)
X4, Y4 = X3-(Y3-Y2), Y3+(X3-X2)
print(X3, Y3, X4, Y4)


x1,y1,x2,y2=map(int,input().split())

xd= x2-x1
yd= y2-y1

x3 = x2 - yd
y3 = y2 + xd
x4 = x1 - yd
y4 = y1 + xd

print(x3,y3,x4,y4)


# coding: utf-8

def main():
    x1, y1, x2, y2 = map(int, input().split())
    x_diff = x2 - x1
    y_diff = y2 - y1

    x3 = x2 - y_diff
    y3 = y2 + x_diff

    x4 = x1 - y_diff
    y4 = y1 + x_diff

    print('{} {} {} {}'.format(x3, y3, x4, y4))

if __name__ == '__main__':
    main()


import sys
from collections import deque
import math
#sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())
def array(n,val=0):
    return [val]*n
def matrix(row,columns,val):
    return [[val]*columns for _ in range(row)]

def solve():
    dx = x2-x1
    dy = y2-y1
    x3 = x2-dy
    y3 = y2+dy
    x4 = x1-dy
    y4 = y1+dx
    print(x3,y3,x4,y4)
    return

if __name__=='__main__':
    x1,y1,x2,y2 = IL()
    solve()


import sys
from collections import deque
import math
#sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())
def array(n,val=0):
    return [val]*n
def matrix(row,columns,val):
    return [[val]*columns for _ in range(row)]

def solve():
    points = sorted(a, key=lambda x: (x[1],-x[0]))
    dx = points[0][0]-points[1][0]
    dy = points[0][1]-points[1][1]
    x3 = points[1][0] + dy
    y3 = points[1][1] - dx
    x4 = points[0][0] + dy
    y4 = points[0][1] - dx
    if points != a:
        x3,x4,y3,y4 = x4,x3,y4,y3
    print(x3,y3,x4,y4)
    return

if __name__=='__main__':
    x1,y1,x2,y2 = IL()
    a = [[x1,y1],[x2,y2]]
    solve()


import sys
from collections import deque
import math
#sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())
def array(n,val=0):
    return [val]*n
def matrix(row,columns,val):
    return [[val]*columns for _ in range(row)]

def solve():
    points = sorted(a, key=lambda x: (x[1],-x[0]))
    dx = points[0][0]-points[1][0]
    dy = points[0][1]-points[1][1]
    x3 = points[1][0] + dy
    y3 = points[1][1] - dx
    x4 = points[0][0] + dy
    y4 = points[0][1] - dx
    print(points,a)
    if points != a:
        x3,x4,y3,y4 = x4,x3,y4,y3
    print(x3,y3,x4,y4)
    return

if __name__=='__main__':
    x1,y1,x2,y2 = IL()
    a = [[x1,y1],[x2,y2]]
    solve()


import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;

public class Main {
    static InputStream is;
    static PrintWriter out;
    static String INPUT = "";

    static void solve() {
        int[] p1 = {ni(), ni()};
        int[] p2 = {ni(), ni()};

        int[] v = {p2[0] - p1[0], p2[1] - p1[1]};
        out.print(p2[0] - v[1]);
        out.print(" ");
        out.print(p2[1] + v[0]);
        out.print(" ");
        out.print(p1[0] - v[1]);
        out.print(" ");
        out.print(p1[1] + v[0]);
        out.println();
    }

    public static void main(String[] args) throws Exception {
        long S = System.currentTimeMillis();
        is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
        out = new PrintWriter(System.out);

        solve();
        out.flush();
        long G = System.currentTimeMillis();
        tr(G-S+"ms");
    }

    private static boolean eof() {
        if(lenbuf == -1)return true;
        int lptr = ptrbuf;
        while(lptr < lenbuf)if(!isSpaceChar(inbuf[lptr++]))return false;

        try {
            is.mark(1000);
            while(true){
                int b = is.read();
                if(b == -1){
                    is.reset();
                    return true;
                }else if(!isSpaceChar(b)){
                    is.reset();
                    return false;
                }
            }
        } catch (IOException e) {
            return true;
        }
    }

    private static byte[] inbuf = new byte[1024];
    static int lenbuf = 0, ptrbuf = 0;

    private static int readByte() {
        if(lenbuf == -1)throw new InputMismatchException();
        if(ptrbuf >= lenbuf){
            ptrbuf = 0;
            try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
            if(lenbuf <= 0)return -1;
        }
        return inbuf[ptrbuf++];
    }

    private static boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }

    private static int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }

    private static double nd() { return Double.parseDouble(ns()); }
    private static char nc() { return (char)skip(); }

    private static String ns() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while(!(isSpaceChar(b))){
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private static char[] ns(int n) {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while(p < n && !(isSpaceChar(b))){
            buf[p++] = (char)b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    private static char[][] nm(int n, int m) {
        char[][] map = new char[n][];
        for(int i = 0;i < n;i++)map[i] = ns(m);
        return map;
    }

    private static int[] na(int n) {
        int[] a = new int[n];
        for(int i = 0;i < n;i++)a[i] = ni();
        return a;
    }

    private static int ni() {
        int num = 0, b;
        boolean minus = false;
        while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if(b == '-'){
            minus = true;
            b = readByte();
        }

        while(true){
            if(b >= '0' && b <= '9'){
                num = num * 10 + (b - '0');
            }else{
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private static long nl() {
        long num = 0;
        int b;
        boolean minus = false;
        while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
        if(b == '-'){
            minus = true;
            b = readByte();
        }

        while(true){
            if(b >= '0' && b <= '9'){
                num = num * 10 + (b - '0');
            }else{
                return minus ? -num : num;
            }
            b = readByte();
        }
    }

    private static void tr(Object... o) { if(INPUT.length() != 0)System.out.println(Arrays.deepToString(o)); }

    // Union-Find
    // https://algs4.cs.princeton.edu/15uf/UF.java.html
    public static class UnionFind {
        private int count = 0;
        private int[] parent, rank;

        public UnionFind(int n) {
            count = n;
            parent = new int[n];
            rank = new int[n];
            for (int i = 0; i < n; i++) {
                parent[i] = i;
            }
        }

        public int find(int p) {
            while (p != parent[p]) {
                parent[p] = parent[parent[p]];
                p = parent[p];
            }
            return p;
        }

        public void union(int p, int q) {
            int rootP = find(p);
            int rootQ = find(q);
            if (rootP ==rootQ) return;
            if (rank[rootQ] > rank[rootP]) {
                parent[rootP] = rootQ;
            } else {
                parent[rootQ] = rootP;
                if (rank[rootP] == rank[rootQ]) {
                    rank[rootP]++;
                }
            }
            count--;
        }

        public int count() {
            return count;
        }

        public void print() {
            out.println("Parent:");
            for (int i : parent) {
                out.print(i);
                out.print(" ");
            }
            out.println();
            out.println("Rank:");
            for (int i : rank) {
                out.print(i);
                out.print(" ");
            }
            out.println();
        }
    }

    // Dijkstra
    // Return min distance from start to end O(ElogV) (negative cost is prohibited)
    // edge is int[3] array {from,to,cost}
    // edges is edge list from specific node
    // all_edges is Map<from node number,edges>
    static int dijkstra(Map<Integer,List<int[]>> all_edges,int start,int end,int max_node_number) {
        int[] distance = new int[max_node_number + 1];
        Arrays.fill(distance, -1);
        PriorityQueue<int[]> p_que = new PriorityQueue<>((a,b) -> ((distance[a[0]] + a[2]) - (distance[b[0]] + b[2])));
        distance[start] = 0;
        List<int[]> edges = all_edges.get(start);
        p_que.addAll(edges);
        while (distance[end] < 0) {
            int[] nearest_edge = p_que.poll();
            assert nearest_edge != null;
            if (distance[nearest_edge[1]] < 0) {
                distance[nearest_edge[1]] = distance[nearest_edge[0]] + nearest_edge[2];
                if (all_edges.containsKey(nearest_edge[1])) {
                    edges = all_edges.get(nearest_edge[1]);
                    for (int[] edge : edges) {
                        if (distance[edge[1]] < 0) p_que.add(edge);
                    }
                }
            }
        }
        return distance[end];
    }

    // Enumerate primes in [2, n] with O(n log log n)
    public static List<Integer> sieveOfEratosthenes(int n) {
        boolean[] isPrime = new boolean[n+1];
        Arrays.fill(isPrime, true);
        for (int i = 2; i * i <= n; i++) {
            if (isPrime[i]) {
                for (int j = i + i; j <= n; j += i) {
                    isPrime[j] = false;
                }
            }
        }
        List<Integer> primes = new ArrayList<>();
        for (int i = 2; i <= n; i++) {
            if (isPrime[i]) {
                primes.add(i);
            }
        }
        return primes;
    }

    // Count divisor
    public static int countDivisor(int n) {
        int[] list = new int[n + 1];
        Arrays.fill(list, 0);
        int num = n;
        for (int i = 2; i <= n; i++) {
            while (num % i == 0) {
                list[i] = list[i] + 1;
                num /= i;
            }
        }
        int ans = 1;
        for (int i : list) {
            ans *= (i + 1);
        }
        return ans;
    }
}


import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] sa = br.readLine().split(" ");
		int x1 = Integer.parseInt(sa[0]);
		int y1 = Integer.parseInt(sa[1]);
		int x2 = Integer.parseInt(sa[2]);
		int y2 = Integer.parseInt(sa[3]);
		br.close();

		int x3 = x2 + y1 - y2;
		int y3 = y2 + x2 - x1;
		int x4 = x3 + x1 - x2;
		int y4 = y3 + y1 - y2;
		System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);
	}
}


import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;

public class Main {

	public static void main(String[] args) {
		FastScanner sc = new FastScanner();
		int x1 = sc.nextInt();
		int y1 = sc.nextInt();
		int x2 = sc.nextInt();
		int y2 = sc.nextInt();
		int x3 = x2 - (y2 - y1);
		int y3 = y2 + (x2 - x1);

		int x4 = x3 - (x2 - x1);
		int y4 = y3 - (y2 - y1);

		System.out.println(x3 + " " + y3 + " " + x4 + " " + y4);

	}

	//以下、自作ライブラリ

	/*
		int N = sc.nextInt();

		int[] a = new int[N];
		for (int i = 0; i < N; i++)
			a[i] = sc.nextInt();

		String s = sc.next();

		String[] a = new String[N];
		for (int i = 0; i < N; i++)
			a[i] = sc.next();
	 */

	//階乗
	public static int fact(int n) {
		if (n == 1 || n == 0)
			return 1;
		else
			return n * fact(n - 1);
	}

	//指定した値以上の要素が最初に現れる位置
	//要素の数は+1（配列のズレ)
	public static long lowerBound(int n, long[] x, long y) {
		int left = 0;
		int right = n;
		while (left < right) {
			int mid = (left + right) / 2;
			if (x[mid] < y) {
				left = mid + 1;
			} else {
				right = mid;
			}
		}
		return left;
	}

	//指定した値より大きい要素が最初に現れる位置
	//要素の数は+1（配列のズレ)
	public static long upperBound(int n, long[] x, long y) {
		int left = 0;
		int right = n;
		while (left < right) {
			int mid = (left + right) / 2;
			if (x[mid] <= y) {
				left = mid + 1;
			} else {
				right = mid;
			}
		}
		return left;
	}

	//最大公約数
	public static long gcd(long a, long b) {
		if (a < b)
			return gcd(b, a);
		long c = 0;
		c = a % b;
		if (c == 0)
			return b;
		return gcd(b, c);
	}

	//最小公倍数
	public static long lcm(long m, long n) {
		return m * n / gcd(m, n);
	}

	//素数判定
	public static boolean isPrime(int n) {
		if (n < 2)
			return false;
		if (n == 2)
			return true;
		if (n % 2 == 0)
			return false;

		for (int i = 3; i * i <= n; i += 2) {
			if (n % i == 0)
				return false;
		}
		return true;
	}
}

//以下、高速スキャナークラス
class FastScanner {
	private final InputStream in = System.in;
	private final byte[] buffer = new byte[1024];
	private int ptr = 0;
	private int buflen = 0;

	private boolean hasNextByte() {
		if (ptr < buflen) {
			return true;
		} else {
			ptr = 0;
			try {
				buflen = in.read(buffer);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (buflen <= 0) {
				return false;
			}
		}
		return true;
	}

	private int readByte() {
		if (hasNextByte())
			return buffer[ptr++];
		else
			return -1;
	}

	private static boolean isPrintableChar(int c) {
		return 33 <= c && c <= 126;
	}

	public boolean hasNext() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr]))
			ptr++;
		return hasNextByte();
	}

	public String next() {
		if (!hasNext())
			throw new NoSuchElementException();
		StringBuilder sb = new StringBuilder();
		int b = readByte();
		while (isPrintableChar(b)) {
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}

	public long nextLong() {
		if (!hasNext())
			throw new NoSuchElementException();
		long n = 0;
		boolean minus = false;
		int b = readByte();
		if (b == '-') {
			minus = true;
			b = readByte();
		}
		if (b < '0' || '9' < b) {
			throw new NumberFormatException();
		}
		while (true) {
			if ('0' <= b && b <= '9') {
				n *= 10;
				n += b - '0';
			} else if (b == -1 || !isPrintableChar(b)) {
				return minus ? -n : n;
			} else {
				throw new NumberFormatException();
			}
			b = readByte();
		}
	}

	public int nextInt() {
		long nl = nextLong();
		if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
			throw new NumberFormatException();
		return (int) nl;
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}


import java.util.*; import java.io.*; import java.math.*;
public class Main{
	//Don't have to see. start------------------------------------------
	static class InputIterator{
		ArrayList<String> inputLine = new ArrayList<String>(1024);
		int index = 0; int max; String read;
		InputIterator(){
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			try{
				while((read = br.readLine()) != null){
					inputLine.add(read);
				}
			}catch(IOException e){}
			max = inputLine.size();
		}
		boolean hasNext(){return (index < max);}
		String next(){
			if(hasNext()){
				return inputLine.get(index++);
			}else{
				throw new IndexOutOfBoundsException("There is no more input");
			}
		}
	}
	static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
	static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
	static PrintWriter out = new PrintWriter(System.out);
	static void flush(){out.flush();}
	static void myout(Object t){out.println(t);}
	static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
	static String next(){return ii.next();}
	static boolean hasNext(){return ii.hasNext();}
	static int nextInt(){return Integer.parseInt(next());}
	static long nextLong(){return Long.parseLong(next());}
	static double nextDouble(){return Double.parseDouble(next());}
	static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
	static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
	static ArrayList<Integer> nextIntArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Integer.parseInt(input.get(i)));
		}
		return ret;
	}
	static ArrayList<Long> nextLongArray(){
		ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
		for(int i = 0; i < input.size(); i++){
			ret.add(Long.parseLong(input.get(i)));
		}
		return ret;
	}
	static String myconv(Object list, int no){//only join
		String joinString = CONVSTR.get(no);
		if(list instanceof String[]){
			return String.join(joinString, (String[])list);
		}else if(list instanceof ArrayList){
			return String.join(joinString, (ArrayList)list);
		}else{
			throw new ClassCastException("Don't join");
		}
	}
	static ArrayList<String> myconv(String str, int no){//only split
		String splitString = CONVSTR.get(no);
		return new ArrayList<String>(Arrays.asList(str.split(splitString)));
	}
	public static void main(String[] args){
		CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
		solve();flush();
	}
	//Don't have to see. end------------------------------------------
	static void solve(){//Here is the main function
      ArrayList<Integer> one = nextIntArray();
      int x1 = one.get(0);
      int y1 = one.get(1);
      int x2 = one.get(2);
      int y2 = one.get(3);
      int tmpX = y2 - y1;
      int tmpY = x2 - x1;
      String[] output = new String[4];
      output[0] = String.valueOf(x2 - tmpX);
      output[1] = String.valueOf(y2 - tmpY);
      output[2] = String.valueOf(x1 - tmpX);
      output[3] = String.valueOf(y1 - tmpY);
      myout(myconv(output, 8));
	}
	//Method addition frame start

	//Method addition frame end
}


package abc108_b;

import java.util.Scanner;

class abc108_b {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int[] input = {0,0,0,0};
        for (int i = 0; i < input.length;i++) {
            input[i] = scan.nextInt(); // x_1,y_1,x_2,y_2
        }
        scan.close();
        int[][] position = {{0,0},{0,0},{0,0},{0,0}};
        position[0][0] = input[0];
        position[0][1] = input[1];
        position[1][0] = input[2];
        position[1][1] = input[3];
        position[2] = revpos(position[0],position[1]);
        position[3] = revpos(position[1], position[2]);
        if (position[0] == revpos(position[2], position[3])) {
            System.out.println("OK");
        }
        int[] output={0,0,0,0};
        output[0] = position[2][0];
        output[1] = position[2][1];
        output[2] = position[3][0];
        output[3] = position[3][1];
        for (int i : output) {
            System.out.println(i);
        }
    }
    public static int[] revpos(int[] p,int[] q) {//pos 1 pos 2
        int[] vec = {0,0};
        for (int i = 0; i < vec.length; i++) {
            vec[i] = p[i] - q[i];
        }
        int tmp = 0;
        tmp = vec[0];
        vec[0] = vec[1];
        vec[1] = -tmp;
        int[] newpos = {0,0};
        for (int i = 0; i < newpos.length; i++) {
            newpos[i] = q[i] + vec[i];
        }
        return newpos;
    }
}


class abc108_b {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int[] input = {0,0,0,0};
        for (int i = 0; i < input.length;i++) {
            input[i] = scan.nextInt(); // x_1,y_1,x_2,y_2
        }
        scan.close();
        int[][] position = {{0,0},{0,0},{0,0},{0,0}};
        position[0][0] = input[0];
        position[0][1] = input[1];
        position[1][0] = input[2];
        position[1][1] = input[3];
        position[2] = revpos(position[0],position[1]);
        position[3] = revpos(position[1], position[2]);
        if (position[0] == revpos(position[2], position[3])) {
            System.out.println("OK");
        }
        int[] output={0,0,0,0};
        output[0] = position[2][0];
        output[1] = position[2][1];
        output[2] = position[3][0];
        output[3] = position[3][1];
        for (int i : output) {
            System.out.println(i);
        }
    }
    public static int[] revpos(int[] p,int[] q) {//pos 1 pos 2
        int[] vec = {0,0};
        for (int i = 0; i < vec.length; i++) {
            vec[i] = p[i] - q[i];
        }
        int tmp = 0;
        tmp = vec[0];
        vec[0] = vec[1];
        vec[1] = -tmp;
        int[] newpos = {0,0};
        for (int i = 0; i < newpos.length; i++) {
            newpos[i] = q[i] + vec[i];
        }
        return newpos;
    }
}


#include <cstdio>
#define rg register
using namespace std;
typedef long long ll;
template <typename Tp> inline int getmin(Tp &x,Tp y){return y<x?x=y,1:0;}
template <typename Tp> inline int getmax(Tp &x,Tp y){return y>x?x=y,1:0;}
template <typename Tp> inline void read(Tp &x)
{
	x=0;int f=0;char ch=getchar();
	while(ch!='-'&&(ch<'0'||ch>'9')) ch=getchar();
	if(ch=='-') f=1,ch=getchar();
	while(ch>='0'&&ch<='9') x=x*10+ch-'0',ch=getchar();
	if(f) x=-x;
}
int x1,y1,x2,y2,a,b;
int main()
{
	read(x1);read(y1);read(x2);read(y2);
	a=x2-x1;b=y2-y1;
	printf("%d %d %d %d\n",x2-b,y2+a,x2-a-b,y2+a-b);
	return 0;
}