jiahuimbzuai/CoQuIR huggingface dataset:
//  [go]
package main

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

func main() {
	A, B := getStdinInt2()

	A1 := A + B
	A2 := A - B
	A3 := A * B

	if A1 > A2 && A1 > A3 {
		fmt.Printf("%d\n", A1)
	} else if A2 > A3 {
		fmt.Printf("%d\n", A2)
	} else {
		fmt.Printf("%d\n", A3)
	}
}

var sc = bufio.NewReaderSize(os.Stdin, 1024*1024*10)

func getStdin() string {
	return readLine()
}
func getStdinInt() int {
	str := getStdin()
	rtn, _ := strconv.Atoi(str)
	return rtn
}
func getStdinInt2() (int, int) {
	list := getStdinIntArr()
	return list[0], list[1]
}
func getStdinInt3() (int, int, int) {
	list := getStdinIntArr()
	return list[0], list[1], list[2]
}
func getStdinInt64() int64 {
	str := getStdin()
	rtn, _ := strconv.ParseInt(str, 10, 64)
	return rtn
}
func getStdinInt64_2() (int64, int64) {
	list := getStdinIntArr64()
	return list[0], list[1]
}
func getStdinInt64_3() (int64, int64, int64) {
	list := getStdinIntArr64()
	return list[0], list[1], list[2]
}
func getStdinIntArr() []int {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.Atoi(val)
	}
	return rtn
}
func getStdinIntArr64() []int64 {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int64, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.ParseInt(val, 10, 64)
	}
	return rtn
}
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(n int) int {
	if n < 0 {
		return -n
	}
	return n
}
func abs64(n int64) int64 {
	if n < 0 {
		return -n
	}
	return n
}
func readLine() string {
	buf := make([]byte, 0, 0)
	for {
		l, p, _ := sc.ReadLine()
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}
//  [ruby]
a,b=gets.split.map &:to_i
puts [a+b,a*b,a-b].max
//  [ruby]
a, b = gets.chomp.split.map(&:to_i)

puts [a * b, a - b, a + b].max
//  [ruby]
#!/usr/bin/env ruby

require 'set'

class Hash
  def push(key, value)
    self[key] = [] if self[key] == nil
    self[key].push(value)
  end
end

class Array
  def lower_bound(value)
    left = -1;
    right = self.length;
    while left + 1 < right
      mid = left + (right - left) / 2;
      if self[mid] >= value
        right = mid
      else
        left = mid
      end
    end
    right
  end

  def unique
    res = [self.first]
    each_cons(2) do |a, b|
      if a != b
        res.push(b)
      end
    end
    res
  end
end

def get_ints
  gets.chomp.split.map(&:to_i)
end

def get_ints_minus_one
  get_ints.map { |x| x - 1 }
end

def get_int
  gets.chomp.to_i
end

A, B = get_ints

plus = A + B
minus = A - B
multi = A * B

puts [plus, minus, multi].max
//  [rust]
use proconio::{fastout, input};

#[fastout]
fn main() {
    input! {a: i32, b: i32};

    let c1 = a + b;
    let c2 = a - b;
    let c3 = a * b;

    let mut result = std::cmp::max(c1, c2);
    result = std::cmp::max(result, c3);

    println!("{}", result)
}
//  [rust]
#[allow(unused_imports)]
use proconio::{fastout, input};

#[fastout]
fn main() {
    input!(a: isize, b: isize);
    let ab = vec![a + b, a - b, a * b];

    println!("{}", ab.iter().max().unwrap());
}
//  [swift]
func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}
let ab = readInts()
let a = ab[0]
let b = ab[1]

let c = [a+b, a-b, a*b]
print(c.max()!)
//  [swift]
let arr=readLine()!.characters.split{$0==" "}.map{Int(String($0))!}

let plus  = arr[0] + arr[1]
let minus = arr[0] - arr[1]
let mul   = arr[0] * arr[1]

var o = plus

if ( o < minus ) {
  o = minus
}

if ( o < mul ) {
  o = mul
}

print( o )
//  [typescript]
const main = lines => {
  console.log(solve(lines));
};

const solve = (lines: string[]): string => {
  const [A, B] = parseLines(lines);
  return Math.max(A + B, A - B, A * B).toString();
};

const parseLines = (lines: string[]) => {
  const obj = lines[0].split(' ').map(n => +n);
  debug(obj);
  return obj;
};

const debug = (message?: any, ...optionalParams: any[]) => {
  if (!!process.env.LOCAL_DEBUG) console.log(message, ...optionalParams);
};

if (!process.env.LOCAL_DEBUG) {
  const { stdin: input, stdout: output } = process;
  input.resume();
  input.setEncoding('utf8');
  const lines = [];
  require('readline')
    .createInterface({ input, output })
    .on('line', line => lines.push(line))
    .on('close', () => main(lines));
}

export default solve;
//  [typescript]
// general helpers
const debug = (message?: any, ...optionalParams: any[]) => {
  if (process.env.LOCAL_DEBUG === '1') console.log(message, ...optionalParams)
}

// helpers
const parseLines = (
  lines: string[]
): { A: number, B: number} => {
  const [A, B] = lines[0].split(' ').map(line => +line)
  const obj = { A, B }
  debug(obj)
  return obj
}
// solver
export const solve = (lines: string[]): string => {
  const { A, B } = parseLines(lines)
  const sum: number = A + B
  const diff: number = A - B
  const multi: number = A * B
  const result: number[] = [sum, diff, multi].sort((a, b) => b - a)
  return `${result[0]}`
}

// main
const main = (lines: string[]) => {
  console.log(solve(lines))
}

// exec main function for submit
if (process.env.LOCAL_DEBUG !== '1') {
  const { stdin: input, stdout: output } = process
  input.resume()
  input.setEncoding('utf8')
  const lines: string[] = []
  require('readline')
    .createInterface({ input, output })
    .on('line', (line: string) => lines.push(line))
    .on('close', () => main(lines))
}
//  [typescript]
import * as readline from "readline";

const rl = readline.createInterface({
    input: process.stdin,
});

const lines = [];
rl.on("line", (line) => {
    lines.push(line);
});
rl.on("close", () => {
    main(lines);
});

function main(lines) {
    const [a, b] = lines[0].split(' ').map(n => parseInt(n));
    console.log(Math.max(a+b, a-b, a*b));
}
//  [python]
x=input();print(x.count("WB")+x.count("BW"))
//  [python]

import sys
input = sys.stdin.readline
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
# A = [ int(input()) for _ in range(N) ]
##############################

S = input().rstrip()
print(S.count('WB') + S.count('BW'))
//  [python]
s = input()
a1 = s.count('BW')
a2 = s.count('WB')
print(a1 + a2)
//  [python]
S = [s for s in input()]
x = S.pop(0)
counter = 0 

while S:
  y = S.pop(0)
  if x!=y:
    counter += 1
    x = y

print(counter)
//  [python]
s = list(input().rstrip())

ans = 0

p_c = s.pop(0)
while s:
    c = s.pop(0)
    if p_c != c:
        ans += 1
    p_c = c
print(ans)
//  [python]
#
# abc047 c
#

import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """BBBWW"""
        output = """1"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """WWWWWW"""
        output = """0"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """WBWBWBWBWB"""
        output = """9"""
        self.assertIO(input, output)


def resolve():
    S = list(input())

    i = 1
    while i < len(S):
        if S[i] == S[i-1]:
            del S[i]
        else:
            i += 1

    print(len(S)-1)


if __name__ == "__main__":
    # unittest.main()
    resolve()
//  [java]
import java.util.*;
import java.io.*;
class Main {
    public static void main(String[] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        // StringTokenizer st = new StringTokenizer(br.readLine());
        String s = (br.readLine());
        System.out.println(solver(s));
        
    }
    public static int solver(String s){
        if(s.length()==1)
            return 0;
        int ans=0;
        char cur = s.charAt(0);
        for (int i=1; i<s.length(); i++) {
            if(s.charAt(i)!=cur){
                ans++;
                cur=s.charAt(i);
            }
        }
        return ans;
    }
}
//  [java]
import java.io.*;
import java.util.*;
import static java.lang.System.out;

public class Main{
    static MyReader in = new MyReader();

    public static void main(String[] args){
        String s = in.s();
        int N = s.length();
        int ans = 0;
        char t = s.charAt(0);
        for(int i = 1; i < N; i++){
            if (s.charAt(i) != t) {
                ans++;
                t = s.charAt(i);
            }
        }
        out.println(ans);
    }

    static class MyReader extends BufferedReader{
        MyReader(){
            super(new InputStreamReader(System.in));
        }

        String s(){
            try{return readLine();}catch(IOException e){return "";}
        }
    }
}
//  [java]
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int len = S.length();
        int[] A = new int[len];
        for(int i = 0; i < len; i++){
            if(S.charAt(i) == 'B'){
                A[i] = 1; //黒は1
            } else {
                A[i] = 0; //白は0
            }
        }
        int ans = 0;
        while(true){
            int i = 0;
            if(A[0] == 1){
                for(i = 0; i < len && A[i] != 0; i++){
                    A[i] = 0;
                }
            } else {
                for(i = 0; i < len && A[i] != 1; i++){
                    A[i] = 1;
                }
                
            }
            ans++;
            if(i == len){
                ans--;
                break;
            }
            if(A[len - 1] == 1){
                for(i = len-1; i >= 0 && A[i] != 0; i--){
                    A[i] = 0;
                }
            } else {
                for(i = len - 1; i >= 0 && A[i] != 1; i--){
                    A[i] = 1;
                }
            }
            ans++;
            if(i == -1){
                ans--;
                break;
            }
        }
        System.out.println(ans);
    }
}
//  [java]
import java.util.Scanner;


public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
	    char[]wb=sc.next().toCharArray();
	    char now=wb[0];
	    int ans=0;
	    for(int i=0;i<wb.length-1;i++){
	    	if(now!=wb[i+1])ans++;
	    	now=wb[i+1];
	    }
	    System.out.println(ans);
		
	}
	
}
//  [java]
import java.util.*;

public class Main {
    public static void main(String[] args) {
        solve(new Scanner(System.in));
//        solve(new Scanner(ex));
    }

    private static final String ex = "WWWWW";
//    private static final String ex = "WWWWWBWBWBBBBWBWWWWBBBB";
//    private static final String ex = "WBWBWBWBWB";

    private static void solve(Scanner scanner) {
        String s = scanner.nextLine();

        LinkedList<Character> stones = new LinkedList<>();
        char last = s.charAt(0);
        stones.add(last);
        for (int i = 1; i < s.length(); i ++) {
            if (last != s.charAt(i)) {
                last = s.charAt(i);
                stones.add(last);
            }
        }

        if (stones.stream().allMatch(x -> x == 'W')) {
            System.out.println(0);
            return;
        } else if (stones.stream().allMatch(x -> x == 'B')) {
            System.out.println(0);
            return;
        }

        System.out.println(stones.size() - 1);
    }
}
//  [cpp]
#include<bits/stdc++.h>
#define ll long long 
#define int ll
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL);
using namespace std;

int32_t main(){
    fast;
    int c{};
    string s;   cin>>s;
    for(int i=0;i<s.length()-1;i++){
        if(s[i]!=s[i+1])    c++;
    }
    cout<<c<<endl;
    return 0;
}
//  [cpp]
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<iomanip>
#include<queue>
#include<stack>
#include<map>
#include<set>
#include<string>
#include<vector>
char gun[100001];
int main()
{
    gets(gun);
    int i,js=0;
    for(i=1;i<strlen(gun);i++)
    if(gun[i]!=gun[i-1])
    js++;
    printf("%d\n",js);
    return 0;
}
//  [cpp]
#include<stdio.h>
#include<string.h>
char srx[100001];
int main()
{
    gets(srx);
    int i,zjq=0;
    for(i=1;i<strlen(srx);i++)//注意从1开始，不然就会多一个
    if(srx[i]!=srx[i-1])
    zjq++;//判断成功就加1（还是C语言的char好用~，可以当数组用）
    printf("%d\n",zjq);//回车注意++
    return 0;
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
stack<char> S;
char str[100000+5];
int main()
{
	scanf("%s",str);
	S.push(str[0]);
	for(int i = 1; i < strlen(str); i++ )
	{
		if(S.top()!=str[i])
			S.push(str[i]); 		
	}
	printf("%d\n",S.size() - 1);
	return 0;
}
//  [cpp]
#include <cstdio>
#include <cstring>
long long  a,b,c,d,i,j,k,x,y,z,ans;
char f[100005];
int main(){
	scanf("%s",f);
	for (i=1;i<=strlen(f)-1;i++){
		if (f[i]!=f[i-1]) ans++;
	}
	printf("%lld",ans);
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
stack<char> S;
char str[100000+5];
//一道大水题，统计有多少颜色不同的段减1就好了。复杂度O(n)
int main()
{
	scanf("%s",str);
	S.push(str[0]);
	for(int i = 1; i < strlen(str); i++ )
	{
		if(S.top()!=str[i])
			S.push(str[i]); 		
	}
	printf("%d\n",S.size() - 1);
	return 0;
}
//  [c]
#include<stdio.h>
int main(){
  char s[100010];
  int i,c=0;
  scanf("%s",s);
  for(i=1;s[i];i++){
    if(s[i]-s[i-1])c++;
  }
  printf("%d\n",c);
  return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>

int main(){
  char s[100005];
  scanf("%s", s);
  int ans = 0, turn = 1, len = strlen(s);
  for(int i=1; i<len; i++)
    if(s[i] != s[i-1])
      ans++;

  printf("%d\n", ans);
  return 0;
}
//  [c]
#include<stdio.h>
#include<math.h>
int main(){
char s[100001];
scanf("%s",s);
int i,j;
for(i=j=0;s[i+1]!='\0';i++)j+=s[i]!=s[i+1];
printf("%d",j);
}
//  [c]
#include<stdio.h>
#include<string.h>

int main(){
  char S[100000] = {};
  scanf("%s", &S);

  char prec = S[0];
  int count = 0;
  for(int i=1; i<100000; i++){
    if(S[i]=='\0'){
      break;
    }else if(S[i]!=prec){
      count++;
    }
    prec = S[i];
  }

  printf("%d\n", count);
  return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>

int main(void){

    char S[100001];

    scanf("%s", S);

    int len = strlen(S);

    int ans = 0;

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

    printf("%d\n", ans);

    return 0;
}
//  [c]
#include<stdio.h>

int main(){
    char s[100001];
    scanf("%s",s);

    int sum=0;
    for(int i=0;s[i+1]!='\0';i++){
        if(s[i]!=s[i+1]){
            sum++;
        }
    }
    printf("%d\n",sum);
    return 0;
}
//  [javascript]
function main(input) {
    var n = input[0].split("");
    var ans = 0;
    for(var i=1;i<n.length;i++){
        if(n[i-1] != n[i]) ans++;
    }
    console.log(ans);
    
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"))
//  [javascript]
var input = require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n");
var obj = {
  "list" : input,
  "index" : 0,
  "max" : input.length,
  "next" : function(){
    if(!this.hasNext()){throw "NoSuchElementException:次に要素は無いよ";}
    var returnObj = this.list[this.index];
    this.index++;
    return returnObj;
  },
  "hasNext" : function(){return (this.index < this.max);}
}
Main();
function next(){return obj.next();}
function nextInt(){return myconv(next(),1);}
function nextStrArray(){return myconv(next(),2);}//半角スペース分割
function nextIntArray(){return myconv(next(),4);}//半角スペース + 数値化
function nextCharArray(){return myconv(next(),6);}//1文字分割
function hasNext(){return obj.hasNext();}
function myout(t){console.log(t);}//標準出力
function myerr(t){console.error(t);}//標準エラー出力
//[no]要素の扱い。数値型
//不明値、異常時:引数そのまま返す　1:数値へ変換
//2:半角SPで分割 4:半角SPで分割し、数値配列へ
//6:1文字で分割  7:1文字で分割し、数値配列へ
//8:半角SPで結合 9:改行で結合 0:文字なしで結合
function myconv(i,no){try{switch(no){case 1:return parseInt(i);case 2:return i.split(" ");case 4:return i.split(" ").map((a)=>Number(a));case 6:return i.split("");case 7:return i.split("").map((a)=>Number(a));case 8:return i.join(" ");case 9:return i.join("\n");case 0:return i.join("");default:return i;}}catch(e){return i;}}
function Main(){
  var s = nextCharArray();
  var output = 0;
  var mae = "";
  for(var i = 0; i < s.length; i++){
    if(i == 0){
       mae = s[i];
    }else{
       if(mae != s[i]){
          output++;
       }
      mae = s[i];
    }
  }
  myout(output);
}
//  [javascript]
input = require('fs').readFileSync('/dev/stdin', 'utf8')
S = input.split('\n').shift()
s = ['W', 'B']
b = S[0] == s[1]
cnt = 0
for (i=1;i<S.length;i++) {
    if (s[~~!b] == S[i]) {
        b = !b
        cnt++
    }
}
console.log(cnt)
//  [javascript]
'use strict'
const main = arg => {
	const input = arg.trim().split("\n");
	let S = input[0]
	console.log(removeSerial(S).length - 1)
	function removeSerial(S){
		let result = S[0]
		for(let i = 1; i < S.length; i++) {
			if(result[result.length - 1] === S[i]) {
				continue
			} else {
				result += S[i]
			}
		}
		return result
	}
}   
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
"use strict";
    
const main = arg => {
    arg = arg.trim().split("\n");
    const S = arg[0].split("");
    const list = [];
    
    let last;
    
    for(let i in S) {
        if(S[i] !== last) {
            list.push(S[i]);
        }
        
        last = S[i];
    }

    console.log(list.join("").length - 1);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function Main(s){
  const n = s.length;
  var ans = 0;
  var a = s[0];
  for(var i = 1; i < n; i++){
    if(s[i] !== a){
      ans++;
      a = s[i];
    }
  }
  console.log(ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
//  [go]
package main

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

func out(x ...interface{}) {
	fmt.Println(x...)
}

var sc = bufio.NewScanner(os.Stdin)

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

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

func main() {
	//sc.Split(bufio.ScanWords)

	reader := bufio.NewReaderSize(os.Stdin, 100000)
	s, _, _ := reader.ReadLine()

	c := s[0]
	cnt := 0
	for i := 1; i < len(s); i++ {
		if c != s[i] {
			cnt++
		}
		c = s[i]
	}

	out(cnt)
}
//  [go]
package main

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

func solve() {
	s := bufio.NewReader(os.Stdin)
	pre := 'A'
	count := 0
	for {
		c, _ := s.ReadByte()
		if c != 'B' && c != 'W' {
			break
		}
		if pre != rune(c) {
			count++
		}
		pre = rune(c)
	}
	fmt.Println(count - 1)
	return
}

var sc = bufio.NewScanner(os.Stdin)

func scanString() string {
	sc.Scan()
	return sc.Text()
}
func scanInt() int {
	sc.Scan()
	a, err := strconv.Atoi(sc.Text())
	if err != nil {
		fmt.Println(err)
	}
	return a
}
func scanFloat64() float64 {
	f, _ := strconv.ParseFloat(scanString(), 64)
	return f
}
func Permute(nums []int) [][]int {
	n := factorial(len(nums))
	ret := make([][]int, 0, n)
	permute(nums, &ret)
	return ret
}
func permute(nums []int, ret *[][]int) {
	*ret = append(*ret, makeCopy(nums))

	n := len(nums)
	var i, j int
	for {
		for i = n - 2; i >= 0; i-- {
			if nums[i] < nums[i+1] {
				break
			}
		}
		if i < 0 {
			return
		}
		for j = n - 1; ; j-- {
			if nums[j] > nums[i] {
				break
			}
		}
		nums[i], nums[j] = nums[j], nums[i]
		for k, l := i+1, n-1; k < l; {
			nums[k], nums[l] = nums[l], nums[k]
			k++
			l--
		}
		*ret = append(*ret, makeCopy(nums))
	}
}

func factorial(n int) int {
	ret := 1
	for i := 2; i <= n; i++ {
		ret *= i
	}
	return ret
}

func pow(n, m int) int {
	ret := 1
	for i := 0; i < m; i++ {
		ret *= n
	}
	return ret
}

func makeCopy(nums []int) []int {
	return append([]int{}, nums...)
}
func gcd(a int, b int) int {
	if b == 0 {
		return a
	}
	return gcd(b, a%b)
}

func eratosthenes(n int) []int {
	search := make([]bool, n+1)
	ans := []int{}
	for i := 2; i < n+1; i++ {
		search[i] = true
	}
	for i := 2; i*i < n+1; i++ {
		for j := 2; i*j < n+1; j++ {
			search[i*j] = false
		}
	}
	for i := 2; i < n; i++ {
		if search[i] {
			ans = append(ans, i)
		}
	}
	return ans
}

func main() {
	sc.Split(bufio.ScanWords)
	solve()
}
//  [go]
package main

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

func getScanner(fp *os.File) *bufio.Scanner {
	scanner := bufio.NewScanner(fp)
	scanner.Split(bufio.ScanWords)
	scanner.Buffer(make([]byte, 500001), 500000)
	return scanner
}

func getNextString(scanner *bufio.Scanner) string {
	scanner.Scan()
	return scanner.Text()
}

func getNextInt(scanner *bufio.Scanner) int {
	i, _ := strconv.Atoi(getNextString(scanner))
	return i
}

func getNextInt64(scanner *bufio.Scanner) int64 {
	i, _ := strconv.ParseInt(getNextString(scanner), 10, 64)
	return i
}

func main() {
	fp := os.Stdin
	if len(os.Args) > 1 {
		fp, _ = os.Open(os.Args[1])
	}

	scanner := getScanner(fp)
	writer := bufio.NewWriter(os.Stdout)

	s := getNextString(scanner)

	n := len(s)
	ans := 0
	for i := 1; i < n; i++ {
		if s[i] != s[i-1] {
			ans++
		}
	}
	fmt.Fprintln(writer, ans)
	writer.Flush()
}
//  [go]
package main

import "fmt"

func main() {
	var s string
	fmt.Scan(&s)
	sum := -1
	c := 'a'
	for _, x := range s {
		if x != c {
			sum++
			c = x
		}
	}
	fmt.Println(sum)
}
//  [go]
package main

import (
	"fmt"
)

func main() {
	var sum int = 0
	var str string
	fmt.Scan(&str)
	for i, v := range []byte(str) {
		iplus := i + 1
		if (iplus < len(str) && v != str[iplus]) {
			sum++
		}
	}
	fmt.Println(sum)
}
//  [go]
package main

import "fmt"
import "strings"

func main() {
	var S string
	fmt.Scan(&S)

	ss := strings.Split(S, "")

	if len(ss) == 0 {
		fmt.Println(0)
		return
	}

	exS := ""
	newSS := []string{}
	for _, s := range ss {
		if s != exS {
			newSS = append(newSS, s)
			exS = s
		}
	}

	fmt.Println(len(newSS) - 1)
}
//  [ruby]
p gets.squeeze.size-2
//  [ruby]
p gets.chomp.squeeze("WB").size-1
//  [ruby]
S = gets.chomp
s = ""
pre = ""
S.chars.each do |c|
  if c != pre
    s += c
    pre = c
  end
end
puts s.count('W') + s.count('B') - 1
//  [ruby]
s = gets.chomp.split('')
t=s[0]
x=s[0]
s[1..-1].each do |a|
    if x!=a
        x=a
        t+=x
    end
end
puts t.split('').length-1
//  [ruby]
S=gets.chomp
L=S[0]
ans=0

for i in 1...S.size do
  if S[i]!=S[i-1]
    ans+=1
    L=S[i]
  end
end

puts ans
//  [rust]
fn read1<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 s = read1::<String>().chars().collect::<Vec<char>>();
    let mut c = s[0];
    let mut ans = 0usize;
    for i in 1..s.len() {
        if c != s[i] {
            c = s[i];
            ans += 1;
        }
    }

    println!("{}", ans);
}
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        #[allow(unused_mut)]
        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)*}
    };
}

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")
    };
}

#[allow(dead_code)]
type Pi = (i32, i32);
fn pri<T: std::fmt::Display>(x: T) {
    println!("{}", x);
}

fn main() {
    input!{
        s: chars,
    }
    let mut ans = 0;
    for i in 1..s.len() {
        if s[i-1] != s[i] {ans += 1;}
    }
    pri(ans);
}
//  [rust]
use std::io::prelude::BufRead;
use std::io::StdinLock;

pub fn read_line(locked_stdin: &mut StdinLock) -> std::io::Result<String> {
    let mut buf = String::new();
    locked_stdin.read_line(&mut buf).map(|_| buf)
}

pub fn read_to_string(locked_stdin: &mut StdinLock) -> std::io::Result<String> {
    read_line(locked_stdin).map(|s| s.trim().to_string())
}

fn main() {
    let s;

    {
        let stdin = std::io::stdin();
        let mut lkin = stdin.lock();
        s = read_to_string(&mut lkin).unwrap();
    }

    let s = s.into_bytes();
    let mut state = s[0];
    println!("{}", s.into_iter().fold(0, |ans, c| if state != c {state = c; ans + 1} else {ans}))
}
//  [rust]
#[allow(unused_imports)]
use proconio::marker::{Bytes, Chars, Usize1};
use proconio::{fastout, input};
#[fastout]
fn main() {
    input! {
        s: Chars,
    }

    let mut count = 0;
    // let mut prev_colour = s[0];
    for i in 0..s.len() - 1 {
        if s[i] != s[i + 1] {
            count += 1;
            // prev_colour = s[i + 1];
        }
    }
    println!("{}", count);
}
//  [rust]
#![allow(non_snake_case)]

use std::io::{stdin, Read};
use std::str::FromStr;
fn read_option<T: FromStr>() -> Option<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()
}
fn read<T: FromStr>() -> T {
    let opt = read_option();
    opt.expect("failed to parse token")
}

fn main() {
    let S: String = read();
    let mut before = S.chars().next().unwrap();
    let mut ans = 0;
    for c in S.chars() {
        if c != before {
            ans += 1;
            before = c;
        }
    }
    println!("{}", ans)
}
//  [swift]
let S = readLine()!.characters.map{$0}
print((1..<S.count).reduce(0){$0+(S[$1]==S[$1-1] ?0:1)})
//  [typescript]
function main(input) {
  input = input.trim();
  let result = 0;
  for (let i = 1; i < input.length; i++) {
  	if (input[i] !== input[i-1]) result++;
  }
  console.log(result);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [python]

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

s = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
s = s[N:] + s[:N]
print(S.translate(str.maketrans("ABCDEFGHIJKLMNOPQRSTUVWXYZ", s)))
//  [python]
N = int(input().strip())
S = input().strip()

alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' * 2
conv = dict(zip(alphabet[:26], alphabet[N: N + 26]))
print(''.join([conv[c] for c in S]))
//  [python]
N = int(input())
S = input()

alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

print(S.translate(str.maketrans(alphabet, alphabet[N:] + alphabet[:N])))
//  [python]
# -*- coding: utf-8 -*-
"""
AtCoder A
"""

import sys, math, random
import numpy as np

# N = int(input())
# A = list(map(int,input().split())) # N row 1 column
# A = [int(input()) for _ in range(N)] # 1 row N column
# S = str(input()) # str(input()) == input() -> 'abc'
# S = list(input()) # abc -> ['a','b','c']
# S.replace('ABC','X') # "testABCABC" -> "testXX"
# S=numpp.assaray(S)=="#"
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LLS(): return [list(sys.stdin.readline().rstrip()) for _ in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()



def main():
    N=I()
    A=S()
    al="ABCDEFGHIJKLMNOPQRSTUVWXYZ"

    out=""
    for a in A:
        x=al.find(a)
        x+=N
        while x>25:
            x-=26
        out+=al[x]

    print(out)




if __name__ == "__main__":
    main()
//  [python]
import sys
input = sys.stdin.readline
from collections import Counter, deque

import numpy as np


INF = float('inf')


def ctoi(char):
    return ord(char) - ord('A')


def itoc(number):
    return chr(number + ord('A'))


def main():
    N = int(input())
    S = list(input().rstrip())
    S_list = np.array([ctoi(c) for c in S])
    S_list += N
    ans = [itoc(num % 26) for num in S_list]
    print(''.join(ans))


if __name__ == '__main__':
    main()
//  [python]
n = int(input())
s = input()

abc = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']

	
for i in range(0, len(s)):
	b = s[i]
	x = abc.index(b) + n
	while x > 25:
		x = x - 26	
	y = abc[x]
	s = list(s)
	s[i] = y
	s = ''.join(s)
print(s)
//  [java]
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(in.readLine());
    char[] s = in.readLine().toCharArray();
    in.close();
    
    for(int i = 0; i < s.length; i++) {
      int x = s[i] + n;
      if('Z' < x)
        x -= 26;
      s[i] = (char)x;
    }
    
    System.out.println(String.valueOf(s));
  }
}
//  [java]
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws Exception {
		// TODO 自動生成されたメソッド・スタブ
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String W = in.readLine();

		int N = Integer.parseInt(W);
		W = in.readLine();

		char[] s = new char[W.length()];
		for(int i=0;i<s.length;i++){
			s[i] = (char)((char)((W.charAt(i)-'A'+N)%26)+'A');
		}

		System.out.println(s);

	}


}
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigDecimal;
	
public class Main {

	/* several useful subroutines */
	private static BufferedReader brStdin = new BufferedReader(new InputStreamReader(System.in));
	private static String[] readBuf = null;
	private static int readPtr = 0;
	private static String getString() throws IOException {
		while ( readBuf == null || readPtr >= readBuf.length ) {
			readBuf = brStdin.readLine().split(" ");
			readPtr = 0;
		}
		return readBuf[readPtr++];
	}
	private static int getInt() throws IOException {
		return Integer.parseInt(getString());
	}
	private static long getLong() throws IOException {
		return Long.parseLong(getString());
	}
	private static BigDecimal getBD() throws IOException {
		return new BigDecimal(getString());
	}
	@SuppressWarnings("unused")
	private static String[] getStringArray(int size) throws IOException {
		String stringArray[] = new String[size];
		for (int i = 0; i < stringArray.length; i++) {
			stringArray[i] = getString();
		}
		return stringArray;
	}
	@SuppressWarnings("unused")
	private static int[] getIntArray(int size) throws IOException {
		int intArray[] = new int[size];
		for (int i = 0; i < intArray.length; i++) {
			intArray[i] = getInt();
		}
		return intArray;
	}
	@SuppressWarnings("unused")
	private static long[] getLongArray(int size) throws IOException {
		long longArray[] = new long[size];
		for (int i = 0; i < longArray.length; i++) {
			longArray[i] = getLong();
		}
		return longArray;
	}
	@SuppressWarnings("unused")
	private static BigDecimal[] getBDArray(int size) throws IOException {
		BigDecimal bdArray[] = new BigDecimal[size];
		for (int i = 0; i < bdArray.length; i++) {
			bdArray[i] = getBD();
		}
		return bdArray;
	}
	@SuppressWarnings("unused")
	private static long calculateLCM(long a, long b) throws IOException {
		if ( a  < b ) {
			long t = a;
			a = b;
			b = t;
		}
		while ( b > 0 ) {
			long t = b;
			b = a % b;
			a = t;
		}
		return a;
	}

	
	/* main routine */
	
	public static void main(String args[]) throws IOException {
		int n = getInt();
		char s[] = getString().toCharArray();
		for ( int i = 0 ; i < s.length ; i++ ) {
			s[i] += n;
			if ( s[i] > 'Z' ) {
				s[i] -= 26;
			}
		}
			
		System.out.println( s );
	}
}
//  [java]

import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		int n=sc.nextInt();
		String s=sc.next();

		n=n%26;

		char[] ss=new char[s.length()];
		for(int i=0;i<s.length();i++) {
			ss[i]=s.charAt(i);
			for(int j=0;j<n;j++) {
			    ss[i]++;
			    if(String.valueOf(ss[i]).matches("[^A-Z]")) {
			    	ss[i]='A';
			    }
			}

		}
		for(int i=0;i<s.length();i++) {
			System.out.print(ss[i]);
		}System.out.println();


	}

}
//  [java]
import java.io.*;
import java.util.*;

public class Main{
    public static void main(String[] args)throws Exception{
        Scanner sc=new Scanner(System.in);
        int n=sc.nextInt();
        String str=sc.next();
        sc.close();
        for(int i=0;i<str.length();i++){
            System.out.printf("%c",(str.charAt(i)+n-'A')%26+'A');
        }
        System.out.println();
    }
}
//  [java]
import java.util.ArrayList;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int num = scan.nextInt();
        String str = scan.next();
        String alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        String result = "";

        for (int i = 0; i < str.length(); i++) {
            char c = str.charAt(i);
            int wantGet = (alpha.indexOf(c) + num) % 26;
            String[] alphaList = alpha.split("");
            result += alphaList[wantGet];
        }

        System.out.println(result);
    }
}
//  [cpp]
#include<bits/stdc++.h>

#define EB emplace_back
#define int long long
#define F first
#define S second
#define N 100005
#define ALL(x) x.begin(),x.end()
#define endl '\n'
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)


using namespace std;


int32_t main()
{
    IOS;

    int tt=1;
    //cin>>tt;
    while(tt--)
    {
        char arr[] = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
		int n; cin>>n;
      	string s; cin>>s;
      	for(auto x :s) cout<<arr[x-'A'+n];
		cout<<endl;
    }
    return 0;

}
//  [cpp]
/*by freesteed*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define pb push_back
#define fill(x,c) memset(x,c,sizeof(x))
#define fi first
#define se second
#define sz(A) (int)(A.size())
#define all(x) (x).begin(),(x).end()
#define caset int ___T; cin>>___T; for(int cs=1;cs<=___T;cs++)
#define get_be(c,x) (lower_bound(c.begin(),c.end(),x)-c.begin())
//get_be biger & equal
typedef long long ll;
typedef pair<int,int> PII;
typedef vector<int> VI;
const ll mod=1e9+7;
const ll oo=1e9+10;
const int Max = 1e6+10;
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
//ll a[Max];
ll k,A,B;
void solve(){
	cin>>k;
	string s;
	cin>>s;
	rep(i,0,sz(s)){
		cout<<(char)('A'+(s[i]-'A'+k)%26);
	} 
}
int main() {
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	//caset{
		solve();
	//}
  	return 0;
}
//  [cpp]
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    string s;
    int n;
    cin >> n >> s;
    for(int i=0; i<s.length(); i++){
        int c = (int)s[i];
        c -= (int)'A';
        c += n;
        c %= 26;
        c += (int)'A';
        s[i] = (char)c;
    }
    cout << s;
    return 0;
}
//  [cpp]
#include <bits/stdc++.h>
#include <algorithm>
#include <math.h>
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define INF 999999999
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );

using llong = long long;
using namespace std;

// long long gcd(long long a, long long b){
//     if (a < b){
//         a ^= b;
//         b ^= a;
//         a ^= b;
//     }
//     return b ? gcd(b, a % b) : a;
// }

// long long lcm(long long a, long long b){
//     return a * b / gcd(a, b);
// }

int main(){
    int n;
    char s[10000];
    cin >> n >> s;
    rep(i,n) rep(j,strlen(s)){
        if(s[j] == 'Z'){
            s[j] = 'A';
            continue;
        }
        s[j]++;
    }
    cout << s << endl;
}
//  [cpp]
#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int inf=0x3f3f3f3f;int n;
char a[10000];
int main()
{cin>>n;
	scanf("%s",a);
	for(int i=1;i<=n;i++)
	{
		for(int j=0;j<strlen(a);j++)
		{
			a[j]++;if(a[j]>'Z')a[j]='A';
		}
	}cout<<a;
	return 0;
}
//  [cpp]
//#define DEB1 //input from input.txt
//#define NDEBUG
#include <iostream>
#include <algorithm>
#include <string>
#include <fstream>
#include <vector>
#include <cstdio>
#include <cmath>
#include <queue>
#include <stack>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <thread>
#include <mutex>
#include <iomanip>
#include <cassert>

#define ZERO(a) memset(a, 0, sizeof(a))
#define MINUS(a) memset(a, 0xff, sizeof(a))
#define INF(a) memset(a, 0x3f, sizeof(a))
#define ALL(t) (t).begin(),(t).end()
#define FILL(a,c) fill(a, a+ sizeof(a)/sizeof(*a),c)
#define FILL2D(A,c) fill(A[0], A[0] +sizeof(A)/sizeof(**A),c)
#define FILL3D(A,c) fill(A[0][0], A[0][0] +sizeof(A)/sizeof(***A),c)
#define REP(i,m) for(int i=0;i<(m);++i)
// closed interval, inverse repeat
#define CIREP(i,start,fin) for(int i=(start);i>=(fin);i--)
#define CREP(i,start,fin) for(int i=(start);i<=(fin);i++)
#define RNG(i,start,fin) for(int i=(start);i<(fin);i++)
#define IN(a, x, b) (a<=x && x<b)
#define PB push_back
#define SZ(x) (int)(x).size()

using namespace std;

using LL = long long;
using PAIR = pair<int, int>;
using PAIRLL = pair<LL,LL>;
using VI = vector<int>;
using VLL = vector<LL>;
using VVLL = vector<VLL>;
using VVI = vector<VI>;
const LL LINF = 1001002003004005006ll;
/* 
template<typename T>inline istream& operator>>(istream&i,vector<T>&v)
{REP(j,SZ(v))i>>v[j];return i;}

template<typename T>string join(const vector<T>&v)
{stringstream s;REP(i,SZ(v))s<<' '<<v[i];return s.str().substr(1);}

template<typename T>inline ostream& operator<<(ostream&o,const vector<T>&v)
{if(SZ(v))o<<join(v);return o;}
*/

template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}




/*
constant values
*/

//const int dx[] = {1,0,-1,0};
//const int dy[] = {0,1,0,-1};
//const int MX = 31001;

//const ll INF= 1LL<<60 ;//INF = 1001001001001; //1e9


// Main program
void solve(){
    int N;
    string S;
    string str ("ABCDEFGHIJKLMNOPQRSTUVWXYZ");
    cerr << str.size();
    cin >> N;
    cin >> S;
    string ans = S;
    int L = S.size();

    REP(i,L){
        char a = S[i];
        REP(j,26){
            cerr << a << endl;
            if(a==str[j]){
                ans[i]=str[(j+N)%26];
            }
        }
    }
    cout << ans << endl;

    return;
}



// ----------------------------------------------
int main(){

#ifdef DEB1
    cout << "DEBUG MODE"  << endl;
    ifstream in("input.txt"); //for debug
    cin.rdbuf(in.rdbuf()); //for debug
#endif

    int T=1; 

    for (int i = 0; i < T; ++i) {
        solve();
    }

    return 0;
}
//  [c]
#include  <stdio.h>
#include <string.h>

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

int main(){
  int n = 0;
  char str[10000] = {};
  int i = 0;
  int letnum = 0;
  char let = 'Z';
  
  scanf("%d",&n);
  scanf(" %s",str);
  // printf("%s",str);
  for(i=0;;i++){
    if(str[i] == '\0'){
      break;
    }
  }
  letnum = i;
  // printf("%d",i);
  for(i=0;i<letnum;i++){
    str[i] += n;
    if(str[i] > 90){
      str[i] -= 26;
    }
  }
  
  printf("%s",str);
  
   
  // A = 65 Z = 90
  return 0;
}
//  [c]
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

#define NEW(p,n){p=malloc((n)*sizeof(p[0]));if(p==NULL){printf("not enough memory\n");exit(1);};}
//pの型の変数n個の要素分のメモリを確保し、そのアドレスをpに代入するマクロ

#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#define SWAP(type, x, y) do { type tmp = x; x = y; y = tmp; } while (0)

#define MOD 1000000007 

typedef struct{
    int priority;
    double value;
}data;

//昇順
int asc(const void* a, const void* b){
    return *(int*)a-*(int*)b;
}

//降順
int desc(const void* a, const void* b){
    return *(int*)b-*(int*)a;
}

int main(void){
    char C[27]="ABCDEFGHIJKLMNOPQRSTUVWXYZ";

    int N;
    scanf("%d",&N);

    char S[10001];
    scanf("%s",S);

    int L = strlen(S);

    //A[0]~A[N-1]に格納する
    for(int i=0;i<L;i++){
        int ind = S[i]-'A';
        //printf("%d\n",ind);
        ind = (ind+N)%26;
        printf("%c",C[ind]);
    }
    printf("\n");

    return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <limits.h>
#include <stdbool.h>

#define rep(i, n) for(int i=0; i<(n); ++i)
#define max  200001

//qsort(str, n, sizeof(int), up_comp);
int up_comp(const void *a, const void *b){return *(int*)a - *(int*)b;}
int down_comp(const void *a, const void *b){return *(int*)b - *(int*)a;}
int int_sort( const void * a , const void * b ) {return strcmp(( char * )a , ( char * )b );}
int count_digit(int a){int i=0;while(a!=0){a=a/10;i++;}return i;}
int euclid( int a, int b ){int temp;if(a<b){temp=a;a=b;b=temp;}if(b<1)return -1;if(a%b==0) return b;return euclid(b,a%b);}

int main(void){
 
    int n;
    char s[max];
    
    scanf("%d%s", &n, s);
    
    rep(i, strlen(s)){
        if (s[i]-64+n>26) {
            printf("%c", s[i]+n-26);
        } else {
            printf("%c", s[i]+n);
        }
    }
    
    return 0;
}
//  [c]
#include<stdio.h>
#include<string.h>
int main(void){
    int n;
    char s[10001];
    scanf("%d%s",&n,s);
    for(int i=0;strlen(s)>i;++i){
        s[i]+=n;
        if(s[i]>90)
        s[i]-=26;
    }
    for(int i=0;strlen(s)>i;++i)
    printf("%c",s[i]);
    return 0;
}
//  [c]
#include<stdio.h>
#include<string.h>

int main(){

    int N,i=1;
    scanf("%d",&N);
  	//printf("%d\n",N);

    char S[10000];
    scanf("%s",S);
  	//printf("%s\n",S);

    for (i = 0; i < strlen(S);i++){
	//printf("OK\n");
        S[i] += N;
      	if(S[i] >= 91) S[i] -= 26;
    }

    for (i = 0; i < strlen(S); i++){
      //printf("Go\n");
            printf("%c",S[i]);
    }
    
    return 0;
}
//  [javascript]
const input = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n');

function main(input) {
  const num = Number(input[0]);
  var str = input[1].split('');
  
  for(var i = 0;i < str.length ;i++){
    var afterInc = str[i].charCodeAt(0) + num;
    if(afterInc > 90){
      afterInc -= 26;
    }
    str[i] = String.fromCharCode(afterInc);
  }
  console.log(str.join(''));
};

main(input);
//  [javascript]
function main(arg) {    
 	arg = arg.trim().split('\n');
 	var n = Number(arg[0]),
  		cut = arg[1].split('');

  	console.log(cut.map(function(str) {
      var num = str.charCodeAt() + n;
      if (num > 90) {
        num -= 26;
      }
      return String.fromCharCode(num)
    }).join(''));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
const main = inputs => {
  const n = +inputs[0]
  const s = inputs[1]
  const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'

  if (n === 0) return console.log(s)
  
  var ans = ''
  for (var i = 0; i < s.length; i++) {
    ans += chars[chars.indexOf(s[i]) + n]
  }
  console.log(ans)
}

main(require("fs").readFileSync("/dev/stdin", "utf8").split('\n'))
//  [javascript]
"use strict";
var GET=(function(){function f(s){return new g(s);}function g(s){this._s=s.trim().split("\n");this._y=0;}g.prototype.a=function(f){var s=this._s, y=this._y, r;if(typeof s[y]==="string")s[y]=s[y].split(" ").reverse();r=s[y].pop();if(!s[y].length)this._y++;return f?r:+r;};g.prototype.l=function(f){var s=this._s[this._y++].split(" ");return f?s:s.map(a=>+a);};g.prototype.m=function(n,f){var r=this._s.slice(this._y,this._y+=n).map(a=>a.split(" "));return f?r:r.map(a=>a.map(a=>+a));};g.prototype.r=function(n,f){var r=this._s.slice(this._y,this._y+=n);return f?r:r.map(a=>+a);};return f;})();
var o=GET(require("fs").readFileSync("/dev/stdin","utf8"));
function xArray(v){var a=arguments,l=a.length,r="Array(a["+--l+"]).fill(0).map(x=>{return "+v+";})";while(--l)r="Array(a["+l+"]).fill(0).map(x=>"+r+")";return eval(r);}

console.log(main());
function main(){
  var n = o.a();
  var s = o.a(1);
  s = s.split("");
  for(var i = 0; i < s.length; i++){
    s[i] = String.fromCharCode((s[i].charCodeAt()-65+n)%26+65);
  }
  return s.join("");
}
//  [javascript]
'use strict'
function main(inp) {
  inp = inp.trim().split('\n')
  const N = Number(inp[0])
  const S = inp[1]
  const alp = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'
  let ans = ''
  for (let i = 0; i < S.length; i++) {
    ans += alp[alp.indexOf(S[i]) + (N%26)]
  }
  console.log(ans)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function myin(){return require("fs").readFileSync("/dev/stdin", "utf8").trim();}
function myout(t){console.log(t);}//standard output
//[no]param
//0:何もしない  1:数値へ変換  2:半角SPで分割  3:改行で分割  4:半角SPで分割し、数値配列へ
//5:改行で分割し、数値配列へ  6:1文字に分割  7:1文字に分割し、数値配列へ
function myconv(i,no){switch(no){case 0:return i;case 1:return parseInt(i);case 2:return i.split(" ");case 3:return i.split("\n");case 4:return i.split(" ").map((a)=>Number(a));case 5:return i.split("\n").map((a)=>Number(a));case 6:return i.split("");case 7:return i.split("").map((a)=>Number(a));}}

function Main(input) {
  input = myconv(input,3);
  var N = myconv(input[0],1);
  if(N == 0 || N == 26){
     myout(input[1]);
  }else{
    var inList = myconv(input[1],6);
    var list = "abcdefghijklmnopqrstuvwxyz".toUpperCase().split("");
    var output = "";
    for(var i = 0; i < inList.length; i++){
      var tmp = inList[i];
      var no = list.indexOf(tmp);
      no += N;
      //myout("in:" + tmp + ",no:" + no);
      if(no > 25){
         no -= 26;
      }
      
      output += list[no];
      //myout("no:" + no + ",add:" + list[no]);
    }
    myout(output);
  }
}

Main(myin());
//  [go]
package main

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

var sc = bufio.NewScanner(os.Stdin)

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

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

func main() {
	n := nextInt()
	s := nextString()

	var ans []rune
	for _, r := range s {
		if r+rune(n) > 'Z' {
			ans = append(ans, 'A'+r+rune(n)-'Z'-1)
		} else {
			ans = append(ans, r+rune(n))
		}
	}
	fmt.Println(string(ans))
}
//  [go]
package main

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

func main() {
	parseProblem(os.Stdin)
}

func parseProblem(r io.Reader) {
	const (
		initialBufSize = 100000
		maxBufSize     = 1000000
	)
	buf := make([]byte, initialBufSize)

	sc := bufio.NewScanner(r)
	sc.Buffer(buf, maxBufSize)
	sc.Split(bufio.ScanWords) // bufio.ScanLines
	n := scanInt(sc)
	str := scanString(sc)

	bu := bytes.NewBufferString("")
	for i := 0; i < len(str); i++ {
		c := str[i] + byte(n)
		if c > 'Z' {
			c = c - 'Z' + 'A' - 1
		}
		bu.WriteByte(c)
	}
	fmt.Println(bu.String())
}

// snip-scan-funcs
func scanInt(sc *bufio.Scanner) int {
	sc.Scan()
	i, _ := strconv.Atoi(sc.Text())
	return int(i)
}
func scanString(sc *bufio.Scanner) string {
	sc.Scan()
	return sc.Text()
}