jiahuimbzuai/CoQuIR huggingface dataset:
//  [java]
import java.util.*;
import java.io.*;

public class Main {
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        int n = sc.nextInt();
        String s = sc.next();
        int k = sc.nextInt();
        String ans = "";
        char ch = s.charAt(k - 1);
        for (int i = 0; i < n; i++) {
            if (s.charAt(i) != ch) {
                ans += "*";
            } else {
                ans += s.charAt(i);
            }
        }
        System.out.println(ans);
    }
}

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());
    }
}
//  [java]

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

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner();
		int n = sc.nextInt();
		String s = sc.next();
		int k = sc.nextInt();
		
		char c = s.charAt(k-1);
		for(char C : s.toCharArray()) {
			if(C == c)
				System.out.print(C);
			else
				System.out.print("*");
		}
		System.out.println();
	}
}

class Scanner {
	private static final int SPACE = (int)' ';
	private static final int LINE_END_0 = 13;
	private static final int LINE_END_1 = 10;
	private static final int BEFORE = -1;
	private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	
	public String next(){
		StringBuilder sb = new StringBuilder();
		
		int length = BEFORE;
		readLoop: while(true) {
			try {
				int value = br.read();
				switch(value) {
				case LINE_END_1:
					if(length == BEFORE)
						break;
					
					if((int)sb.charAt(length) == LINE_END_0)
						sb.deleteCharAt(length);
				case SPACE:
					break readLoop;
				}
				sb.append((char)value);
				length++;

			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		return sb.toString();
	}
	
	public String[] nextArray(int length) {
		String[] array = new String[length];
		for(int i = 0; i < length; i++)
			array[i] = next();
		return array;
	}
	
	public double nextDouble() {
		return Double.parseDouble(next());
	}
	
	public double[] nextDoubleArray(int length) {
		double[] array = new double[length];
		for(int i = 0; i < length; i++)
			array[i] = nextDouble();
		return array;
	}
	
	public int nextInt() {
		return Integer.parseInt(next());
	}
	
	public int[] nextIntArray(int length) {
		int[] array = new int[length];
		for(int i = 0; i < length; i++)
			array[i] = nextInt();
		return array;
	}
	
	public long nextLong() {
		return Long.parseLong(next());
	}
	
	public long[] nextLongArray(int length) {
		long[] array = new long[length];
		for(int i = 0; i < length; i++)
			array[i] = nextLong();
		return array;
	}
	
	public boolean ready() {
		try {
			return br.ready();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return false;
	}
}
//  [java]
import java.util.*;
import java.lang.Math;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String s = sc.next();
    int k = sc.nextInt();
    char ans[] = new char[n];
    char key = s.charAt(k);
    char stack;
    
    for(int i = 0; i < n; i++){
      if(s.charAt(i) == key) ans[i] = key;
      else ans[i] = '*';
    } 
   	
  	for(int i = 0; i < n; i++) System.out.print(ans[i]);
    System.out.println();

  }
}
//  [java]
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 S = sc.next();
        int K = sc.nextInt();
        String Slist[] = S.split("");
        
        String change = Slist[K-1];
        
        for(int i=0;i<S.length();i++){
            
            if(!(Slist[i].equals(change))){
                Slist[i]="+";
            }
        }
        
        
        
        
        
    }
}
//  [java]
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 S = sc.next();
        int K = sc.nextInt();
        String Slist[] = S.split("");
        
        String change = slist[K-1];
        
        for(int i=0;i<S.length();i++){
            
            if(!(Slist[i].equals(change))){
                Slist[i]="+";
            }
        }
        
        
        
        
        
    }
}
//  [cpp]
#include<bits/stdc++.h>
#define fi first
#define se second
#define bug cout<<"--------------"<<endl
using namespace std;
typedef long long ll;
const double PI=acos(-1.0);
const double eps=1e-6;
const int inf=1e9;
const ll mod=1e9+7;
const int maxn=1e5+10;
int n,k;
char s[15];
int main(){
    ios::sync_with_stdio(false);
    //cout<<(1ll<<62)<<endl;
    cin>>n>>s+1>>k;
    char c=s[k];
    for(int i=1;i<=n;i++){
        if(s[i]==c) cout<<s[i];
        else cout<<"*";
    }
	return 0;
}
//  [cpp]
#include <bits/stdc++.h>
#include <cstdlib>
#define ll long long
#define FOR(i,x,y) for(ll i=(ll)x; i<(ll)y; ++i)
#define MX 100010
using namespace std;

int n,k;
string s;
string ans;
char t;
int main(){
        cin >> n >> s >> k;
        ans = s;
        t = ans[k-1];
        FOR(i,0,n){
                if(s[i] != t) ans.replace(i,1,"*");
        }
        cout << ans << endl;

        return 0;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);

const int N = 1e5+5;
int  a[N];

int main()
{
	IOS;
	int n,k;
	string s;
	cin >> n >> s >> k;
	char lol = s[k-1];
	for(int i = 0; i < n; i++)
	{
		if(lol == s[i])
		{
			cout << s[i];
			continue;
		}
		cout<<"*";
	}
	return 0;
}
//  [cpp]
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
using ll = long long;

int main() {
  int N, K;
  string S;
  cin >> N >> S >> K;

  rep(i, N) {
    if (S[i] != S[K])
      cout << '*';
    else
      cout << S[i];
  }

  return 0;
}
//  [cpp]

  #include <string>
#include <math.h>
#include <iostream>

using namespace std;

int main()
{
  int wqwq;
  cin >> wqwq;
  string x;
  cin >> x;
    int a;
  cin >> a;
  int n = x.size();
  for (int i =0; i < n; i++) {
    if (x[i] == x[a])
      cout << x[a];
    else
      cout << '*';
  }
}
//  [cpp]
#include<iostream>
#include<string>
using namespace std;
int main()
{
  int n,k;
  string s;
  cin>>n;
  cin>>s;
  cin>>k;
  for(int i=0;i<n;i++){
    if(s[k-1]==s[i]){
      s[i]='*';
    }
  }
  cout<<s;
}
//  [c]
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>

#define pai 3.1415926535

int main(void) {
	int N;
	scanf("%d", &N);
	char S[11];
	scanf("%s", S);
	int K;
	scanf("%d", &K);

	for (int i = 0; i < N; i++) {
		if (S[i] != S[K - 1]) {
			S[i] = '*';
		}
	}
	printf("%s\n", S);

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

char S[10+1];

int main()
{
  int cnt;
  int N,K;
  int i;

  cnt = scanf("%d", &N);
  scanf("%*c");
  for (i=1; i<=N; i++) {
    cnt = scanf("%c", &S[i]);
  }
  cnt = scanf("%d", &K);

  for (i=1; i<=N; i++) {
    if (S[i] != S[K]) {
      printf("*");
    } else {
      printf("%c", S[K]);
    }
  }

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

int main(){
    int n, k, i;
    char s[1000000];
    scanf("%d",&n);
    scanf("%s",s);
    scanf("%d",&k);
    for (i=0;i<n;i++){

        if(s[i] != s[k-1]){
            s[i] = '*';
        }
    }
    printf("%s\n",s);
    return 0;
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(void){
    int n,k;
    char s[20];
    scanf("%d",&n);
    scanf("%s",s);
    scanf("%d",&k);
    for(int i=0;s[i]!='\0';i++){
        if(s[i]!=s[k]){s[i]='*';}
    }
    printf("%s",s);
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(void){
    int n,k;
    char s[20];
    scanf("%d",&n);
    scanf("%s",s);
    scanf("%d",&k);
    for(int i=1;s[i]!='\0';i++){
        if(s[i]!=s[k]){s[i]='*';}
    }
    printf("%s",s);
}
//  [c]
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main(void){
    int n,k;
    char s[20];
    scanf("%d",&n);
    scanf("%s",s);
    scanf("%d",&k);
    for(int i=1;s[i]!='\0';i++){
        if(s[i]!=s[k]){s[i]='*'}
    }
    printf("%s",s);
}
//  [javascript]
function Main(input){
	input = input.split("\n");
	var n = input[2];
	var arr = input[1].split("");
	var s = arr[n-1];
	for(var i=0;i<arr.length;i++){
		if(arr[i]!=s) arr[i] = "*";
	}
	console.log(arr.join(""))
}Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
//  [javascript]

function Main(input) {
  // 数字
  var N = parseInt(input[0], 10);
  var S = input[1];
  var K = parseInt(input[2], 10);
  // 文字

  var changeStr = S.charAt(K - 1);

  const regex = new RegExp(`[^${changeStr}]`, 'g')
  console.log(S.replace(regex, '*' ));
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n|\s/));
//  [javascript]
function Main(input) {
    var result;
    const N = parseInt(input[0])
    const S = input[1]
    const K = parseInt(input[2])-1
    
    const target = S.charAt(K);
    var ret = "";
    for(var i = 0; i < N; i++){
        ret += S.charAt(i) == target ? target : "*";
    }
    console.log(ret);
}

// 改行・空白で分割
Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n|\s/));
//  [javascript]
'use strict'
function Main(input){
  input=input.trim().split(/\n/);
  var N=input[0]-0,S=input[1].split(''),K=input[2]-0;
  var e=S[K];
  var ans=S.map(x=>x===e?e:'*').join('');
  console.log(ans);
}

Main(require('fs').readFileSync('/dev/stdin','utf8'));
//  [javascript]
'use strict'
function Main(input){
  input=input.trim().split(/\n/);
  var N=input[0]-0,S=input[1].split(''),K=input[2];
  var e=S[K];
  var ans=S.map(x=>x===e?e:'*').join('');
  console.log(ans);
}

Main(require('fs').readFileSync('/dev/stdin','utf8'));
//  [go]
// https://atcoder.jp/contests/tenka1-2019-beginner/tasks/tenka1_2019_b

package main

import "fmt"

func main() {
	var N, K int
	var s []byte

	fmt.Scanf("%d", &N)
	fmt.Scanf("%s", &s)
	fmt.Scanf("%d", &K)

	c := s[K-1]
	for i := range s {
		if s[i] != c {
			s[i] = '*'
		}
	}
	fmt.Println(string(s))
}
//  [go]
package main

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

const pi = math.Pi

var mod int = pow(10, 9) + 7
var Umod uint64 = 1000000007
var ans, cnt, sum int

func main() {
	reader.Split(bufio.ScanWords)
	N, _ := strconv.Atoi(read())
	S := read()
	T := make([]string, N)
	K, _ := strconv.Atoi(read())
	K--
	for i := 0; i < N; i++ {
		if string(S[K]) != string(S[i]) {
			T[i] = "*"
		} else {
			T[i] = string(S[i])
		}
	}
	fmt.Println(strings.Join(T, ""))
}

/*  ----------------------------------------  */

var reader = bufio.NewScanner(os.Stdin)

func read() string {
	reader.Scan()
	return reader.Text()
}

func lcm(x, y int) int {
	return (x / gcd(x, y)) * y
}

func gcd(x, y int) int {
	if x%y == 0 {
		return y
	} else {
		r := x % y
		return gcd(y, r)
	}
}

var fac [1000000]int
var finv [1000000]int
var inv [1000000]int

func combination_init() {
	fac[0], fac[1] = 1, 1
	finv[0], finv[1] = 1, 1
	inv[1] = 1

	// invは a^(-1) mod p
	// pをaで割ることを考える

	// p/a*(a) + p%a = p
	// p/a*(a) + p%a = 0          (mod p)
	// -p%a = p/a*(a)             (mod p)
	// -p%a *a^(-1)= p/a          (mod p)
	// a^(-1)= p/a * (-p%a)^(-1)  (mod p)
	// a^(-1) =

	for i := 2; i < 1000000; i++ {
		fac[i] = fac[i-1] * i % mod
		inv[i] = mod - inv[mod%i]*(mod/i)%mod
		finv[i] = finv[i-1] * inv[i] % mod
	}
}

func combination(x, y int) int {
	if x < y {
		return 0
	}
	if fac[0] != 1 {
		combination_init()
	}
	return fac[x] * (finv[y] * finv[x-y] % mod) % mod
	//return fac[x] / (fac[y] * fac[x-y])
}

func permutation(x, y int) int {
	if x < y {
		return 0
	}
	if fac[0] != 1 {
		combination_init()
	}
	return fac[x] * (finv[x-y] % mod) % mod
	//return fac[x] / fac[x-y]
}

func max(x ...int) int {
	var res int = x[0]
	for i := 1; i < len(x); i++ {
		res = int(math.Max(float64(x[i]), float64(res)))
	}
	return res
}

func min(x ...int) int {
	var res int = x[0]
	for i := 1; i < len(x); i++ {
		res = int(math.Min(float64(x[i]), float64(res)))
	}
	return res
}
func pow(x, y int) int { return int(math.Pow(float64(x), float64(y))) }
func abs(x int) int    { return int(math.Abs(float64(x))) }
func floor(x int) int  { return int(math.Floor(float64(x))) }
func ceil(x int) int   { return int(math.Ceil(float64(x))) }

type SortBy []int

func (a SortBy) Len() int           { return len(a) }
func (a SortBy) Swap(i, j int)      { a[i], a[j] = a[j], a[i] }
func (a SortBy) Less(i, j int) bool { return a[i] < a[j] }

type PriorityQueue []int

func (h PriorityQueue) Len() int            { return len(h) }
func (h PriorityQueue) Less(i, j int) bool  { return h[i] < h[j] }
func (h PriorityQueue) Swap(i, j int)       { h[i], h[j] = h[j], h[i] }
func (h *PriorityQueue) Push(x interface{}) { *h = append(*h, x.(int)) }
func (h *PriorityQueue) Pop() interface{} {
	old := *h
	n := len(old)
	x := old[n-1]
	*h = old[0 : n-1]
	return x
}
//  [go]
package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var n, k int
	var s string
	scanner.Scan()
	fmt.Sscan(scanner.Text(), &n)
	scanner.Scan()
	fmt.Sscan(scanner.Text(), &s)
	scanner.Scan()
	fmt.Sscan(scanner.Text(), &k)

	for i := 0; i < n; i++ {
		if s[i] != s[k] {
			fmt.Printf("*")
		} else {
			fmt.Printf(string(s[i]))
		}
	}
}
//  [go]
package main

import (
	"fmt"
	"strings"
)

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

	a := S[K]

	var s = []string{}

	for i := 0; i < N; i++ {
		if S[i] != a {
			s = append(s, string('*'))
		} else {
			s = append(s, string(a))
		}
	}
	fmt.Println(strings.Join(s, ""))
}
//  [go]
package main

import (
	"fmt"
)

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

	a := S[K]

	var s = []string{}

	for i := 0; i < N; i++ {
		if S[i] != a {
			s[i] = string('*')
		}
	}
	fmt.Println(s)
}
//  [ruby]
_ = gets
s = gets.chomp
k = gets.to_i
puts s.gsub(/[^#{s[k - 1]}]/, "*")
//  [ruby]
gets;s=gets.chomp;puts s.gsub(/[^#{s[gets.to_i-1]}]/, '*')
//  [ruby]
n = gets.to_i
s = gets.chomp
k = gets.to_i-1

n.times{|i|
  if s[i]!=s[k]
    s[i] = "*"
  end
}

puts s
//  [ruby]
gets;puts gets.chomp.gsub(/[^#{s[gets.to_i-1]}]/, '*')
//  [ruby]
N=input()
s=input()
K=int(input())

t=s[K-1]
for i in range(N):
    if s[i]!=t:
        S[i]="*"
print("".join(s))
//  [ruby]
n,s,k=$<.read.split
r=Regexp.new("[^#{s[k.to_i]}]")
puts s.gsub(r,'*')
//  [rust]
use std::io::{stdin, Read, StdinLock};
use std::str::FromStr;

fn main() {
    let cin = stdin();
    let mut scan = Scanner::new(cin.lock());
    let n = scan.read::<usize>();
    let s = scan.chars();
    let k = scan.read::<usize>()-1;
    let c = s[k];
    let mut t = vec![];
    for i in 0..n {
        t.push( if s[i] == c {c} else {'*'})
    }
    println!("{}", t.into_iter().collect::<String>());
}

// region template
#[allow(dead_code)]
fn iu(i: isize) -> usize { i as usize }

#[allow(dead_code)]
fn ui(i: usize) -> isize { i as isize }

#[allow(dead_code, deprecated)]
fn join<T: std::fmt::Display>(slice: &[T], sep: &str) -> String {
    let strings = slice.iter().map(|t| format!("{}", t)).collect::<Vec<_>>();
    strings.connect(sep)
}

struct Scanner<'a> {
    cin: StdinLock<'a>,
}

#[allow(dead_code)]
impl<'a> Scanner<'a> {
    fn new(cin: StdinLock<'a>) -> Scanner<'a> {
        Scanner { cin: cin }
    }

    fn read1<T: FromStr>(&mut self) -> Option<T> {
        let token = self.cin.by_ref().bytes().map(|c| c.unwrap() as char)
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect::<String>();
        token.parse::<T>().ok()
    }

    fn read<T: FromStr>(&mut self) -> T {
        self.read1().unwrap()
    }

    fn readn<T: FromStr>(&mut self, n: usize) -> Vec<T> {
        let mut ret = vec![];
        for _ in 0..n { ret.push(self.read::<T>()) }
        ret
    }

    fn chars(&mut self) -> Vec<char> {
        self.read::<String>().chars().collect()
    }
}
// endregion
//  [rust]
#![allow(non_snake_case)]
#![allow(unused_variables)]
#![allow(dead_code)]

fn main() {
    let N: usize = {
        let mut line: String = String::new();
        std::io::stdin().read_line(&mut line).unwrap();
        line.trim().parse().unwrap()
    };
    let S: Vec<char> = {
        let mut line: String = String::new();
        std::io::stdin().read_line(&mut line).unwrap();
        line.trim().chars().collect()
    };
    let K: usize = {
        let mut line: String = String::new();
        std::io::stdin().read_line(&mut line).unwrap();
        line.trim().parse().unwrap()
    };

    let ans = S.iter()
        .map(|&c| if c == S[K - 1] {
            c.to_string()
        } else {
            "*".to_string()
        })
        .collect::<Vec<_>>()
        .join("");

    println!("{}", ans);
}
//  [rust]
#![allow(non_snake_case)]
#![allow(unused_variables)]
#![allow(dead_code)]

fn main() {
    let N: usize = {
        let mut line: String = String::new();
        std::io::stdin().read_line(&mut line).unwrap();
        line.trim().parse().unwrap()
    };
    let S: Vec<char> = {
        let mut line: String = String::new();
        std::io::stdin().read_line(&mut line).unwrap();
        line.trim().chars().collect()
    };
    let K: usize = {
        let mut line: String = String::new();
        std::io::stdin().read_line(&mut line).unwrap();
        line.trim().parse().unwrap()
    };

    let ans = S.iter()
        .map(|&c| if c == S[K - 1] {
            c.to_string()
        } else {
            "*".to_string()
        })
        .collect::<String>();

    println!("{}", ans);
}
//  [rust]
use std::io::{stdin, Read, StdinLock};
use std::str::FromStr;

// reference: http://ir5.hatenablog.com/entry/20171209/1512821837

struct Scanner<'a> {
    cin: StdinLock<'a>,
}
 
impl<'a> Scanner<'a> {
    fn new(cin: StdinLock<'a>) -> Scanner<'a> {
        Scanner { cin: cin }
    }
 
    fn read1<T: FromStr>(&mut self) -> Option<T> {
        let token = self.cin.by_ref().bytes().map(|c| c.unwrap() as char)
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect::<String>();
        token.parse::<T>().ok()
    }
 
    fn read<T: FromStr>(&mut self) -> T {
        self.read1().unwrap()
    }
}

use std::mem;
use std::cmp;

fn main() {
    let cin = stdin();
    let cin = cin.lock();
    let mut sc = Scanner::new(cin);

    let mut N: usize = sc.read();
    let mut S: String = sc.read();
    let K: usize = sc.read();
    let k = S.chars().nth(K).unwrap();
    let mut ans = String::new();
    for i in 0..N {
        let c = S.chars().nth(i).unwrap();
        if c != k {
            ans.push('*');
        } else {
            ans.push(c);
        }
    }    
    println!("{}", ans);
}
//  [rust]
use proconio::input;

fn main() {
    input!(n: usize, s: proconio::marker::Chars, k: usize);
    let sk = s[k];
    println!(
        "{}",
        s.iter()
            .map(|&c| if c == sk { c } else { '*' })
            .collect::<String>()
    );
}
//  [rust]
#[allow(unused_imports)]
use std::char::*;
#[allow(unused_imports)]
use std::cmp::*;
use std::io::*;
use std::str::FromStr;
#[allow(unused_imports)]
use std::collections::*;

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

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

#[derive(PartialEq, PartialOrd)]
pub struct Total<T>(pub T);

impl<T: PartialEq> Eq for Total<T> {}

impl<T: PartialOrd> Ord for Total<T> {
    fn cmp(&self, other: &Total<T>) -> std::cmp::Ordering {
        self.0.partial_cmp(&other.0).unwrap()
    }
}

//const MAX:usize = 100006;
//const INF:u64 = u64::max_value();

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

    let chk = s[k-1];

    for ch in s.iter_mut() {
        if chk != *ch {*ch='*'}
    }

    println!("{}", s.iter().collect::<String>());
    
}
//  [swift]
let num = Int(readLine()!)
let str = readLine()!
let mask = Int(readLine()!)

var count = 1
var masks = ""
var out = ""

for s in str.characters {
  if( count == mask ) {
  	masks = String(s)
  }
  count += 1
}

for s in str.characters {
  if( String(s) != masks ) {
    out += "*"
  } else {
  	out += String(s)
  }
}

print( out )
//  [swift]
import Foundation

#if swift(>=4.0)
extension String {
    func split(by separator: String) -> [String] {
        return self.components(separatedBy: separator)
    }
    func toArray() -> [String] {
        return self.map{String($0)}
    }
}
#else
extension String {
    func split(by separator: String) -> [String] {
        return self.componentsSeparatedByString(separator)
    }
    var count: Int {
        return self.characters.count
    }
    func toArray() -> [String] {
        return self.characters.map{String($0)}
    }
    func uppercased() -> String {
        return self.uppercaseString
    }
    func lowercased() -> String {
        return self.lowercaseString
    }
}
//extension Array where Element == String {
//    func joined(separator separator: String) -> String {
//        return self.joinWithSeparator(separator)
//    }
//}
extension Array where Element: Comparable {
    func max() -> Element {
        return self.maxElement()!
    }
    func min() -> Element {
        return self.minElement()!
    }
    func sorted() -> Array {
        return self.sort()
    }
    func reversed() -> Array {
        return self.reverse()
    }
    mutating func sort() {
        self.sortInPlace()
    }
}
extension Array {
    init(repeating: Element, count: Int) {
        self.init(count: count, repeatedValue: repeating)
    }
}
func stride<T: Strideable>(from start: T, to end: T, by stride: T.Stride) -> StrideTo<T> {
    return start.stride(to: end, by: stride)
}
#endif
func readInt() -> Int? {
    return Int(readLine()!)
}
func readStringSplit(by separator: String) -> [String] {
    return readLine()!.split(by: separator)
}
func readIntSplit(by separator: String) -> [Int] {
    return readLine()!.split(by: separator).map{Int($0)!}
}
func exponentiate(_ lhs: Int, _ rhs: Int) -> Int {
    return (0..<rhs).reduce(1){i,_ in i*lhs}
}

/*************** テストスペース ***************/

//let input = readIntSplit(by: " ")
//let (N, M, X) = (input[0], input[1], input[2])
//let A = readIntSplit(by: " ")

/*************** メインプログラム ***************/

let N = readInt()!
var S = readLine()!.toArray()
let K = readInt()!
let c = S[K-1]
for i in 0..<N {
    if S[i] != c {
        S[i] = "*"
    }
}
print(S.joinWithSeparator(""))
//  [swift]
import Foundation

var N:Int = Int(readLine()!)!
var S:[String] = readLine()!.compactMap{String($0)}
var K:Int = Int(readLine()!)!

var str = S[K-1]


for i in 0..<S.count{
    if(S[i] == str){
        
    }else{
        S[i] = "*"
    }
}

var result:String = ""
for i in 0..<S.count {
    result = result + S[i]
}
print(result)
//  [typescript]
const Main = input=>{
  const given = input.split('\n');
  const given_s = given[1];

  const target = given_s[Number(given[2])-1];
  let rtn = ""; 
  for(let i=0; i<Number(given[0]); i++) rtn += (given_s[i]===target) ? given_s[i]:'*';
  console.log(rtn);
};

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
import * as fs from "fs";
const input = fs.readFileSync("/dev/stdin", "utf8").split("\n");

const [n, s, k] = input;
const char = s[Number(k) - 1];
let result = "";
for (const charS of s) {
    if (charS !== char) {
        result = result + "*";
    } else {
        result = result + char;
    }
}
console.log(result);
//  [typescript]
function main(input) {
  let [N, S, K] = input.split("\n");
  [N,K] = [N,K].map(v => parseInt(v));
  console.log(S.replace(new RegExp(`[^${S[K-1]}]`, "g"), "*"));
}
main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
//  [typescript]
import * as fs from "fs";

const input = (fs.readFileSync("/dev/stdin", "utf8") as string).split("\n");
const [n] = input[0].split(" ").map((x: number): number => +x);
const [s] = input[1].split(" ").map((x: string): string => x);
const [k] = input[2].split(" ").map((x: number): number => +x);

const v = s[k-1];
const out = Array(n).fill().reduce((acc, current, i, a)=>{
  if(i === 0){
    return acc
  }
  if(i === k-1){
    return acc+v
  }
  return acc+'*'
}, '*');

console.log(out)
//  [typescript]
const Main = input=>{
  const given = input.split('\n');
  const given_s = given[1];

  const target = given_s[Number(given[2])];
  let rtn = ""; 
  for(let i=0; i<Number(given[0]); i++) rtn += (given_s[i]===target) ? given_s[i]:'*';
  console.log(rtn);
};

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
const fs = require('fs')
const stdin = fs.readFileSync('/dev/stdin', 'utf8')

let [n, s, k] = stdin.split('\n')

const i = Number(k) - 1

const repStr = s[i]

const filtered = s.split(repStr).filter(e=>e)

filtered.forEach(e => {
  s = s.replace(e, '*')
})

console.log(s)
//  [python]
n = int(input())
print(n // 3)
//  [python]
N=int(input())
print(N//3)
//  [python]
N = int(input())
print(N//3)
//  [python]
#!/usr/bin/env python3

N = int(input())

ret = 0
for i in range(3, N):
    if N % i == 0:
        ret = max(N//i, ret)

print(ret)
//  [python]
h, w, d = map(int, input().split())
arr = [0] * (h * w + 1)

a = [list(map(int, input().split())) for _ in range(h)]

for i in range(h):
    for j in range(w):
        s = a[i][j]
        arr[s] = (i, j)

q = int(input())
lr = [list(map(int, input().split())) for _ in range(q)]

cnt = h * w
result = [[0] for _ in range(d)]
for i in range(d):
    l = i
    score = 0
    while l + d <= cnt:
        if l == 0:
            result[i].append(score)
            l += d
            continue
        (ux, uy) = arr[l]
        (vx, vy) = arr[l + d]
        score += (abs(vx - ux) + abs(vy - uy))
        result[i].append(score)
        l += d


for l, r in lr:
    ans = result[l % d]
    print(ans[r // d] - ans[l // d])
//  [python]
N = int(input())
print(N*(N+1)/2)
//  [java]
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main{
	public static void main(String[] args)throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    String dataDim = br.readLine();
	    StringTokenizer st = new StringTokenizer(dataDim);
	    StringBuilder sb = new StringBuilder();
	    int N = Integer.parseInt(st.nextToken());
	    System.out.println(N/3);
	}
}
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    BufferedReader rd;

    Main() throws IOException {
        rd = new BufferedReader(new InputStreamReader(System.in));
        compute();
    }

    private void compute() throws IOException {
        int n = pint();
        out(n/3);
    }

    private int pint() throws IOException {
        return pint(rd.readLine());
    }

    private int pint(String s) {
        return Integer.parseInt(s);
    }

    private static void out(Object x) {
        System.out.println(x);
    }

    public static void main(String[] args) throws IOException {
        new Main();
    }
}
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String args[]) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        if(n % 3 == 0){
            System.out.println(n/3);
        }
        else{
            System.out.println(n/3);
        }
    }
}
//  [java]
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int count = 0;
		int n = N;
		for(int i = 0; i < N;i++) {
			if(n > 3) {
				n = n-3;
				count++;
			}else {
				break;
			}
		}
		System.out.println(count);
	}
}
//  [java]
import java.util.Scanner;
public class A4 {
	public static void main(String[] args) {
		Scanner sc = new Scanner (System.in);
		
		int N = sc.nextInt();
		
System.out.println(N/3);
		
	}
}
//  [java]


import java.util.Arrays;
import java.util.Scanner;

public class Main {

	static Scanner scanner;

	public static void main(String[] args) {
	    scanner = new Scanner(System.in);

        int N=gi();

        for (int i=0; i<N; i++) {
            String s=gs();
            if(s.equals("Y")) {
            	 System.out.println("Four");
            	 return;
            }
        }
        

	    System.out.println("Three");

//	    if (isNumber(s1) && isNumber(s2) && s.charAt(a) == '-') {
//	    	System.out.print("Yes");
//	    }else {
//	    	System.out.print("No");
//	    }



	}

	public static long d(long n) {
		String a=String.valueOf(n);
		return (long)a.length();
	}

	// 文字列として入力を取得
	public static String gs() {
		return scanner.next();
	}

	// intとして入力を取得
	public static int gi() {
		return Integer.parseInt(scanner.next());
	}

	// longとして入力を取得
	public static long gl() {
		return Long.parseLong(scanner.next());
	}

	// doubleとして入力を取得
	public static double gd() {
		return Double.parseDouble(scanner.next());
	}
}
//  [cpp]
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<ctime>
#include<algorithm>
#include<queue>
#include<vector>
#define ll long long
#define max(a,b) (a>b?a:b)
#define min(a,b) (a<b?a:b)
#define inf (1ll<<60)
#define mod 1000000007
#define eps 1e-18
inline ll read()
{
    ll tmp=0; char c=getchar(),f=1;
    for(;c<'0'||'9'<c;c=getchar())if(c=='-')f=-1;
    for(;'0'<=c&&c<='9';c=getchar())tmp=(tmp<<3)+(tmp<<1)+c-'0';
    return tmp*f;
}
using namespace std;
int main()
{
	int n=read();
	printf("%d\n",n/3);
	return 0;
}
//  [cpp]
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

int compare_int(const void *a, const void *b)
{
    return *(int*)a - *(int*)b;
}
/*qsort(array, array_size, sizeof(int), compare_int)*/

void sort_char(char *C, int string_long)
{
	int i;
	int num[string_long];
	for (i = 0; i < string_long; i++) {
		num[i] = (int)C[i];
	}
	qsort(num, string_long, sizeof(int), compare_int);
	for (i  =0; i < string_long; i++) {
		C[i] = (char)num[i];
	}
}
/*sort_char(array, strlen(array))*/

void change_int(int *a, int *b)
{
	int c = *a;
	*a = *b;
	*b = c;
}


void change_char(char *s, char *t)
{
	char u = *s;
	*s = *t;
	*t = u;
}

int diff_abso_value(int a, int b)
{
	if (a >= b)
		return a - b;
	else
		return b - a;
}

int main()
{
	int n;
	scanf("%d", &n);
	printf("%d", n/3);
	return 0;
}
//  [cpp]
#include <cstdio>

int main(void) {
    int n;
    scanf("%d", &n);
    printf("%d\n", n / 3);
    return 0;
}
//  [cpp]
#include<oistream>
using namespace std;

int main(){
  int n, d;
  cin>>n;
  d=n/3;
  
  cout<<d<<endl;
  
  return 0;
}
//  [cpp]
test.cpp
Загрузка параметров совместного доступа…
Тип
Текст
Размер
5 КБ (5 074 байта)
Использовано
5 КБ (5 074 байта)
Расположение
N человек
Владелец
я
Изменено
мной 15 сент. 2020 г.
Открыто
мной 03:09
Создано
15 сент. 2020 г. в приложении Google Drive Web
Добавить описание
Читателям разрешено скачивать файл
#define _USE_MATH_DEFINES
#define forn(i, n) for(lli i=0; i<n; i++)
#define forn1(i, n) for(lli i=1; i<n; i++)
#define debug(x) cerr << "------" << x << endl;
#define All(x) x.begin(), x.end()
#define elif else if
#define lli long long int
#define _USE_MATH_DEFINES
#define _x first
#define _y second

#define _CRT_SECURE_NO_WARNINGS



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

#include <stdlib.h>
#include <limits.h>
#include <iomanip>
#include <fstream>
#include <algorithm>
#include <iostream>
#include <math.h>
#include <string>
#include <cmath>
#include <numeric>
#include <map>
#include <unordered_map>
#include <vector>
#include <queue>
#include <set>
#include <unordered_set>
#include <bitset>
#include <stack>
#include <list>
#include <sstream>

#include <random>
#include <typeinfo>

using namespace std;

//Constant vars

const lli MOD = 1000000007, LIM = 4294967295;

//Vars

lli n, m, a, b, c, d, q, k, tr, summ, ans, minx, maxx, li, lj, lk, ri, rj, rk, mid, l1, r1, mid1, res, mass1[10000][10000], mass2[100001], mass[100000], from[1000][1000];

string s, trs, str, ss;

//Structures

set<lli> g, bb, all;
set<vector<lli>> myset, myset1, childs[51][51][51];
vector<vector<lli>> myvec[51][51], toWrite, myvec2;
vector<pair<lli, lli>> mm, mm1;
vector<vector<lli>> mvv;
queue<lli> myq;
map<lli, lli> mymap, mymap1, mymap2;
map<lli, vector<lli>> mymapvec;
multiset<lli> mmset;
unordered_map<string, lli> smap;





int compare(const void * a, const void * b) {

	return -((*(lli*)a) - (*(lli*)b));

};

lli gcd(lli a, lli b) {

	while (b != 0) {

		lli t = b;
		b = a % b;
		a = t;

	}

	return a;

}

lli gcdex(lli a, lli b, lli & x, lli & y) {
	if (a == 0) {
		x = 0; y = 1;
		return b;
	}
	lli x1, y1;
	lli d = gcdex(b%a, a, x1, y1);
	x = y1 - (b / a) * x1;
	y = x1;
	return d;
}

lli NOK(lli n1, lli n2) {

	return n1 * n2 / gcd(n1, n2);

}

lli bin_pow(lli base, lli p) {
	if (p == 1) {
		return base % MOD;
	}
	if (p == 0) {
		return 1;
	}

	if (p % 2 == 0) {
		lli t = bin_pow(base, p / 2) % MOD;
		return t * t % MOD;
	}
	else {
		return bin_pow(base, p - 1) * base % MOD;
	}
}

lli inverse_element(lli x) {
	return bin_pow(x, MOD - 2);
}


lli divide(lli a, lli b) {
	return a * inverse_element(b) % MOD;
}

int main() {

	//freopen("input.txt", "r", stdin);
	//freopen("testlist.txt", "w", stdout);

	ios::sync_with_stdio(0);
	cin.tie();

	cin >> n;
	cout << n / 3;

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

int main(void){
int n;scanf("%d", &n); printf("%d\n", n / 3); return 0;}
//  [c]
#include <stdio.h>
int main(void){
    
    int n;// Y
    scanf("%d",&n);
    printf("%d",n/3);
        
return 0;
}
//  [c]
#include<stdio.h>
int main()
{
	int a;
	scanf("%d", &a);
	printf("%d\n",a/3);
	return 0;
}
//  [c]
#include <stdio.h>

int main()
{
	int N;
	scanf("%d", &N);
	if (N % 3 == 1) printf("%d\n", N / 3 - 1);
	else printf("%d\n", N / 3);
	fflush(stdout);
	return 0;
}
//  [c]
int main()
{
	int N, x;
	scanf("%d", &N);

	x = N / 3;
	printf("number of group=%d\n", x);
}
//  [c]
#include<stdio.h>
int main()
{
    int N;
    scanf("%d",&N);
    if(N>2)
    {
        printf("%d",N%3);
    }
    else
    {
      printf("%d",0);
    }
    return 0;
}
//  [javascript]
'use strict';

const Main = input => {
  const howmany = parseInt(input, 10);
  const amari = howmany % 3;
  const Answer = () => {
    switch (amari) {
      case 1:
        return (howmany - 1) / 3;

      case 2:
        return (howmany - 2) / 3;

      case 0:
        return howmany / 3;

      default:
      return 0;
    }
  };
  console.log(Answer());
};
Main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function Main(input){
input  = Number(input);
ans = Math.floor(input / 3);
console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
'use strict'

const main = input => {
	const args = input.split('\n').map(arg => arg.split(' '))
	const N = parseInt(args[0][0], 10)
	console.log(Math.floor(N / 3))
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [javascript]
function main(input) {
  input=input.trim();
const a = parseInt(input.split(" ")[0], 10);
if(a%3==0){
  console.log(Math.floor(a/3));
}else{
  console.log(Math.floor(a/3)+1);
}
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function main(input) {
  input=input.trim();
const a = parseInt(input.split(" ")[0], 10);
if(a%3==0){
  console.log(Math.floor(a));
}else{
  console.log(Math.floor(a)+1);
}
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function main(input) {
  input=input.trim();
  const a = parseInt(input.split(" ")[0], 10);
console.log(Math.floor(a));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [go]
package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	fmt.Println(n / 3)
}
//  [go]
package main

import (
	"fmt"
)

func maint() {
	var n int
	fmt.Scan(&n)

	fmt.Println(n/3)
}
//  [go]
package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	var shurui []rune
	for i := 0; i < n; i++ {
		var char rune
		fmt.Scan(&char)
		for i,c := range shurui {
			if c == char{
				break
			}
			if i == len(shurui)-1{
				shurui = append(shurui, char)
			} 
		}
		if len(shurui) == 3{
			fmt.Println("Three")
		} else if len(shurui) == 4{
			fmt.Println("Four")
		}
	}
}
//  [go]
package main

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

var sc = bufio.NewScanner(os.Stdin)

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

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

func main() {
	// sc.Split(bufio.ScanWords)
	var n int
	fmt.Scan(&n)
	m := map[string]int{}
	var s string
	for i := 0; i < n; i++ {
		fmt.Scan(&s)
		m[string(s[0])]++
	}

	march := "MARCH"
	
	ans := 0
	for i := 0; i < n; i++ {
		for j := i + 1; j < n; j++ {
			for k := j + 1; k < n; k++ {
				ans += m[string(march[i])] * m[string(march[j])] * m[string(march[k])]
			}
		}
	}

	fmt.Println(ans)
}
//  [ruby]
puts gets.to_i / 3
//  [ruby]
p gets.to_i/3
//  [ruby]
puts gets.chomp.to_i/3
//  [ruby]
p gets.to_i%3
//  [ruby]
puts get.chomp.to_i/2
//  [ruby]
# ある学校には、N 人の生徒がいます。
# 生徒たちをいくつかのグループに分け、グループごとにあるテーマについて話し合ってもらうこととなりました。
# あなたは、2 人以下のグループだと効果的な話し合いが出来ないと考えており、
# なるだけ多くのグループを 3 人以上にしたいです。
# 生徒たちを上手く分けて、3 人以上のグループの数を最大化してください。

n = gets.to_i
group_count = n / 3
puts n % 3 == 0 ? group_count : group_count - 1
//  [rust]
use std::io::*;
use std::str::FromStr;

pub 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 n: usize = read();
    println!("{}", n / 3);
}
//  [rust]
use std::io;

fn procon_read<T: std::str::FromStr>() ->  Vec<T> {
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let iter = buf.split_whitespace();
	let mut v: Vec<T> = Vec::new();
	for i in iter {
		v.push(i.parse().ok().unwrap());
	}
	v
}

fn main() {
	let v:Vec<i32> = procon_read();
	let n = v[0];
	println!("{}", n/3);
}
//  [rust]
// Template from https://techracho.bpsinc.jp/jhonda/2019_08_05/78537

// input macro for competive-programming from https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
#[allow(unused_macros)]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
}

#[allow(unused_macros)]
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)*}
    };
}

#[allow(unused_macros)]
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<_>>()
    };

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

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

    ($iter:expr, bytes) => {
        read_value!($iter, String).into_bytes()
    };

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

fn main() {
    use std::io::Read;
    let mut s = String::new();
    std::io::stdin().read_to_string(&mut s).unwrap();

    println!("{}", solve(&s));
}

macro_rules! test {
    ($($input:expr => $output:expr),* $(,)*) => {
        #[test]
        fn solve_test() {
            $(
                assert_eq!(solve($input), $output);
            )*
        }
    };
}

test! {
r#"2018 218"# => "Yes",
r#"2763 0"# => "No",
//
}

fn solve(src: &str) -> String {
    input! {
        source = src,
        n: i64,
    }

    (n / 3) .to_string()
}
//  [rust]
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		try (Scanner scanner = new Scanner(System.in)) {
			int n = scanner.nextInt();
			System.out.println(n / 3);
		}
	}
}
//  [rust]
fn main() {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    let n: i32 = s.parse().unwrap();
    println!("{}", n/3);
}
//  [rust]
fn main() {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    let n: usize = s.parse().unwrap();
    println!("{}", n/3);
}
//  [swift]
import Glibc
extension String: CollectionType {}

//var inp = readLine()!.split(" ").map { Int($0)! }
var n = Int(readLine()!)!
print(n / 3)
//  [swift]
print(Int(readLine()!)!/3)
//  [swift]
print((Int(readLine()!)!-2)/3)
//  [swift]
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>

#define CK(N, A, B) (A <= N && N < B)
#define REP(i, a, b) for (int i = a; i < b; i++)
#define RREP(i, a, b) for (int i = (b - 1); a <= i; i--)
#define F first
#define S second
#define ll long long

const int INF = 1e9;
const long long LLINF = 1e18;

using namespace std;

int dy[] = {0,1,0,-1};
int dx[] = {1,0,-1,0};
int dy8[] = {0,1,1,1,0,-1,-1,-1};
int dx8[] = {1,1,0,-1,-1,-1,0,1};

/*==================================================*/
/*variable*/
int N;
/*==================================================*/
/*function*/

/*==================================================*/

int main() {
    cin>>N;
    cout<<N/3<<endl;
    return 0;
}
//  [typescript]
const input=require('fs').readFileSync('/dev/stdin', 'utf8').split(/[\s]/);const nin=()=>{const r = input[0];input.shift();return Number(r)};const nrin=(n)=>{const a:number[]=[];rep(n,()=>a.push(nin()));return a};const sin=()=>{const r = input[0];input.shift();return String(r)};const out=(...a)=>{console.log(...a)};const floor=(a)=>{return Math.floor(a)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const rep=(n, callback)=>{for(let i = 0;i < n; i++){callback()}};const strrep=(s, i, v)=>{return s.slice(0, i)+v+s.slice(i+1);};const permutation=({result=[],pre=[],post,n=post.length})=>{if(n>0){post.forEach((_,i)=>{const rest=[...post];const elem=rest.splice(i, 1);permutation({result, pre: [...pre,...elem],post:rest,n:n-1})})}else{result.push(pre)}return result};const sw=(s,a:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<a.length;i+=2){if(op==='=='){if(s==a[i])return a[i+1]}else if(op==='>='){if(s>=a[i])return a[i+1]}else if(op==='<='){if(s<=a[i])return a[i+1]}else if(op==='>'){if(s>a[i])return a[i+1]}else if(op==='<'){if(s<a[i])return a[i+1]}}return a[a.length-1];};const or=(a,...b)=>{for(let i=0;i<b.length;i++)if(a==b[i])return true;return false};const maxindex=(...a)=>{return a.indexOf(Math.max.apply(null,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 ceil=a=>{return Math.ceil(a)};const srin=s=>{const a:string[]=[];rep(s,()=>a.push(sin()));return a};let ssinteger=-1;const ssin=()=>{ssinteger++;return input[0][ssinteger]};
const main = ()=>{
  out(floor(nin()/3))
}
main()
//  [typescript]
import * as fs from 'fs';

namespace AtCoder.abc001 {

    export class Program {

        constructor(private readonly args: string[][]) {
        }

        /**
         * in
         *
         * out
         *
         */
        main(this: Program): void {
            const n: number = parseInt(this.args[0][0], 10);

            console.log(Math.floor(n / 3));

        }
    }
}

const args: string[][] = fs.readFileSync('/dev/stdin', 'utf8').trim().split('\n').map(r => r.split(' '));
const prg: AtCoder.abc001.Program = new AtCoder.abc001.Program(args);
prg.main();
//  [typescript]
const main = (input) => {
  input = input.split(' ');
  const N = parseInt(input[0], 10);
  
  console.log(Math.floor(N/3));
  
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
const main = (input) => {
  input = input.split(' ');
  const N = parseInt(input[0], 10);
  
  console.log(N%3);
  
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
const main = (input) => {
  input = input.split(' ');
  const N = parseInt(input[0], 10);
  
  console.log(N/3);
  
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
declare function require(x: string): any;

    const main = (input: string[][]) => {
        const s: string[] = input[1];
        if (s.every((c) => c != 'Y')) {
            console.log('Three');
        } else {
            console.log('Four');
        }
    };

const whole_input: string = require('fs').readFileSync('/dev/stdin', 'utf8');
main(whole_input.split('\n').map((s: string) => s.split(' ')));zx
//  [python]
n,k = map(int,input().split())
a = []
for i in range(1,n+1,2):
    a.append(i)

if len(a) >= k:
    print('YES')
else:
    print('NO')
//  [python]
N, K = list(map(int, input().split()))

if (N+1) // 2 >= K:
    print('YES')
else:
    print('NO')
//  [python]
N, K= map(int, input().split())

if N%2==0:
    max_num=N//2
    if max_num>=K:
        print("YES")
    else:
        print("NO") 
else:
    max_num=N//2+1
    if max_num>=K:
        print("YES")
    else:
        print("NO")