jiahuimbzuai/CoQuIR huggingface dataset:
//  [ruby]
s = gets.chomp
k = gets.to_i

n = 1
idx = nil
s.chars.each.with_index do |c,i|
  
  if c != '1'
    n = c
    idx = i + 1
    break
  end
  
end

if idx && idx <= k
  puts n
else
  puts 1
end
//  [ruby]
s=gets.split("").map &:to_i
k=gets.to_i
n=5000*10**12
ans=0
s.each{|i|
  n-=i**n
  if n<=0
    ans=i
    break
  end
}
puts ans
//  [ruby]
s=gets.chomp
k=gets.to_i

if k==1
    puts s[0]
    return
end

n=s.length
n.times do |i|
    if s[i]!="1"
        puts s[i]
        return
    end
end
puts 1
//  [ruby]
s = gets.strip.to_s
k = gets.to_i
if s[0]==1
  if k==1
    puts 1
  else
    if s[0..k-1].all?("1")
      puts 1
    else
      puts s[1]
    end
  end
else
  puts s[0]
end
//  [rust]
#![allow(unused_imports, unused_macros, dead_code)]

macro_rules! min {
    (.. $x:expr) => {{
        let mut it = $x.iter();
        it.next().map(|z| it.fold(z, |x, y| min!(x, y)))
    }};
    ($x:expr) => ($x);
    ($x:expr, $($ys:expr),*) => {{
        let t = min!($($ys),*);
        if $x < t { $x } else { t }
    }}
}
macro_rules! max {
    (.. $x:expr) => {{
        let mut it = $x.iter();
        it.next().map(|z| it.fold(z, |x, y| max!(x, y)))
    }};
    ($x:expr) => ($x);
    ($x:expr, $($ys:expr),*) => {{
        let t = max!($($ys),*);
        if $x > t { $x } else { t }
    }}
}
macro_rules! ewriteln {
    ($($args:expr),*) => { let _ = writeln!(&mut std::io::stderr(), $($args),*); };
}
macro_rules! trace {
    ($x:expr) => { ewriteln!(">>> {} = {:?}", stringify!($x), $x) };
    ($($xs:expr),*) => { trace!(($($xs),*)) }
}
macro_rules! put {
    (.. $x:expr) => {{
        let mut it = $x.iter();
        if let Some(x) = it.next() { print!("{}", x); }
        for x in it { print!(" {}", x); }
        println!("");
    }};
    ($x:expr) => { println!("{}", $x) };
    ($x:expr, $($xs:expr),*) => { print!("{} ", $x); put!($($xs),*) }
}

const M: i64 = 1_000_000_007;

fn main() {
    let mut sc = Scanner::new();
    let s: Vec<char> = sc.chars();
    let mut k: i64 = sc.cin();
    let mut i = 0;
    loop {
        if k == 1 {
            put!(s[i]);
            return;
        } else if s[i] == '1' && k > 1 {
            i += 1;
            k -= 1;
        }
        else if s[i] != '1' && k >= 1 {
            put!(s[i]);
            return;
        }
        else if i == s.len() - 1 {
            put!(s[i]);
            return;
        }
    }
}

use std::io::{self, Write};
use std::str::FromStr;
use std::collections::VecDeque;

struct Scanner { stdin: io::Stdin, buffer: VecDeque<String>, }
impl Scanner {
    fn new() -> Self { Scanner { stdin: io::stdin(), buffer: VecDeque::new() } }
    fn cin<T: FromStr>(&mut self) -> T {
        while self.buffer.len() == 0 {
            let mut line = String::new();
            let _ = self.stdin.read_line(&mut line);
            for w in line.split_whitespace() {
                self.buffer.push_back(String::from(w));
            }
        }
        self.buffer.pop_front().unwrap().parse::<T>().ok().unwrap()
    }
    fn chars(&mut self) -> Vec<char> { self.cin::<String>().chars().collect() }
    fn vec<T: FromStr>(&mut self, n: usize) -> Vec<T> { (0..n).map(|_| self.cin()).collect() }
}
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let 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(unused_imports)]
use std::{i32, i64, u32, u64, f64};
#[allow(unused_imports)]
use std::cmp::{max, min, Ordering};
#[allow(unused_imports)]
use std::collections::{VecDeque, HashMap, BTreeMap, HashSet, BTreeSet};
#[allow(unused_imports)]
use std::io::{stdout, Write, BufWriter};
#[allow(unused_imports)]
use std::mem::{swap};
//#[allow(unused_imports)]
//use proconio::marker::{Isize1, Usize1, Bytes, Chars};

//#[proconio::fastout]
fn main() {
    input!{
        s: String,
        k: i64
    }
    let k = k - 1;
    let s = s.chars().map(|c| c.to_digit(10).unwrap()).collect::<Vec<_>>();
    let p = s.iter().position(|n| *n != 1).unwrap_or(0);
    if k >= p as i64 { println!("{}", s[p]); }
    else { println!("1"); }
}
//  [rust]
use proconio::{fastout, input, marker::Chars};

#[allow(unused_mut)]
#[fastout]
fn main() {
    input! {
        s: Chars,
        k: usize
    }
    let first = s.iter().find(|&&s| s != '1');
    let first_pos = s.iter().position(|&s| s != '1');
    match first {
        Some(n) => {
            let first_pos = first_pos.unwrap();
            if k < first_pos {
                println!("1");
            } else {
                println!("{}", n);
            }
        }
        None => {
            println!("1");
        }
    }
}
//  [rust]
use proconio::{input,fastout,marker::Chars};

#[allow(unused_mut)]
#[fastout]
fn main() {
    input!{
        s: Chars,
        k: usize
    }
    let first = s.iter().find(|s| *s != &'1').unwrap();
    if s.len() < k{
        println!("{}",first);
    }else{
        if s[k - 1] == '1'{
            println!("1");
        }else{
            println!("{}",first);
        }
    }

}
//  [rust]
use proconio::{input, fastout};
use proconio::marker::{Chars};
use std::cmp::*;

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

#[fastout]
fn main() {
    input!{
        s: Chars,
        k: usize,
    }

    let mut ans = 0;
    for i in 0..s.len() {
        if s[i]=='1' {
            continue;
        } else {
            ans = s[i].to_digit(10).unwrap();
            break;
        }
    }
    if ans==0 {
        ans = 1;
    }

    println!("{}", ans);

}
//  [swift]
let S = readLine()!.characters.map{String($0)}
let K = Int(readLine()!)! - 1
for (i, c) in S.enumerate() {
  if c == "1" {
    if K == i {
      print(c)
      break
    }
  } else {
    print(c)
    break
  }
}
//  [swift]
// 🐋💭
import Foundation

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

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

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

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

///最大公約数を返す
func gcd(_ array: [Int]) -> Int {
    var value = array[0]
    if array.count > 1 {
        for i in 1..<array.count {
            value = gcd(value, array[i])
        }
    }
    return value
}

///最小公倍数を返す
func lcm(_ m:Int, _ n:Int) -> Int {
    return m * n / gcd(m, n)
}

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

//https://program-life.com/669
///実行速度の計測
func exectionTime(action: () -> Void) {
    let startDate = Date()
    action()
    let endDate = Date()
    print(endDate.timeIntervalSince(startDate))
}

// https://melheaven.hatenadiary.jp/entry/atcoder144
///約数の配列を返す
func makeDivisors(_ n:Int) -> [Int] {
    var divisors = [Int]()
    for i in 1..<Int(pow(Double(n), 0.5)) + 1 {
        if n % i == 0{
            divisors.append(i + n / i)
        }
    }
    
    return divisors
}

//https://riptutorial.com/ja/swift/example/14738/インデックスを知らずに配列から要素を削除する
extension Array where Element: Equatable {
    
    mutating func remove(_ element: Element) {
        _ = firstIndex(of: element).flatMap {
            self.remove(at: $0)
        }
    }
}

func binarySearch(rifgt:Int, key:Int, ary:[String]) -> Int{
    var left = 0
    var right = rifgt
    
    while abs(right - left) > 1 {
        let mid = left + (right - left) / 2
        
        if Int(ary[mid])! < key {
            left = mid
            
        } else {
            right = mid
        }
    }
    return left
}

func arrangement (prev:String, ary:[String], returnVal:[String]) -> [String] {
    var returnVal = returnVal
    if ary.count == 0 {
        returnVal.append(prev)
        return returnVal
    }
    
    for s in ary {
        let wprev = prev + s
        var wary = ary
        wary.remove(s)
        returnVal = arrangement(prev: wprev, ary: wary, returnVal: returnVal)
    }
    return returnVal
}

func main() {
    let (s, k) = (readLine()!.map { Int(String($0))! }, readInt())
    //＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿ここまで入力
    var f = 1
    var count = 0
    while f <= 1 && count < k {
        f = s[count]
        count += 1
    }
    print(f)
}

main()
//  [swift]
// 🐋💭
import Foundation

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

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

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

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

///最大公約数を返す
func gcd(_ array: [Int]) -> Int {
    var value = array[0]
    if array.count > 1 {
        for i in 1..<array.count {
            value = gcd(value, array[i])
        }
    }
    return value
}

///最小公倍数を返す
func lcm(_ m:Int, _ n:Int) -> Int {
    return m * n / gcd(m, n)
}

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

//https://program-life.com/669
///実行速度の計測
func exectionTime(action: () -> Void) {
    let startDate = Date()
    action()
    let endDate = Date()
    print(endDate.timeIntervalSince(startDate))
}

// https://melheaven.hatenadiary.jp/entry/atcoder144
///約数の配列を返す
func makeDivisors(_ n:Int) -> [Int] {
    var divisors = [Int]()
    for i in 1..<Int(pow(Double(n), 0.5)) + 1 {
        if n % i == 0{
            divisors.append(i + n / i)
        }
    }
    
    return divisors
}

//https://riptutorial.com/ja/swift/example/14738/インデックスを知らずに配列から要素を削除する
extension Array where Element: Equatable {
    
    mutating func remove(_ element: Element) {
        _ = firstIndex(of: element).flatMap {
            self.remove(at: $0)
        }
    }
}

func binarySearch(rifgt:Int, key:Int, ary:[String]) -> Int{
    var left = 0
    var right = rifgt
    
    while abs(right - left) > 1 {
        let mid = left + (right - left) / 2
        
        if Int(ary[mid])! < key {
            left = mid
            
        } else {
            right = mid
        }
    }
    return left
}

func arrangement (prev:String, ary:[String], returnVal:[String]) -> [String] {
    var returnVal = returnVal
    if ary.count == 0 {
        returnVal.append(prev)
        return returnVal
    }
    
    for s in ary {
        let wprev = prev + s
        var wary = ary
        wary.remove(s)
        returnVal = arrangement(prev: wprev, ary: wary, returnVal: returnVal)
    }
    return returnVal
}

func main() {
    let (s, _) = (readLine()!.map { Int(String($0))! }, readInt())
    //＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿ここまで入力
    var f = 1
    var count = 0
    while f <= 1 && count < s.count {
        f = s[count]
        count += 1
    }
    print(f)
}

main()
//  [swift]
let S = readLine()!.characters.map{String($0)}
let K = Int(readLine()!)!
for (i, c) in S.enumerate() {
  if c == "1" {
    if K == i {
      print(c)
      break
    }
  } else {
    print(c)
    break
  }
}
//  [swift]
let S = readLine()!.characters.map{String($0)}
let K = Int(readLine()!)!
if K == 1 {
  print(S[0])
} else {
  for c in S {
    if c != "1" {
      print(c)
      break
    }
  }
}
//  [typescript]
function main(input) {
const S = input.split("\n")[0];
const K = parseInt(input.split("\n")[1],10);
let bool = true;
for(let i=0;i<K;i++){
  if(S.charAt(i)!=="1"){bool=false;break;}
}
 if(bool){
   console.log('1');
 }else{
   console.log(S.split('').find((v)=>v!=="1"))
 } 
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
function readLines(): Promise<string[]> {
    return new Promise<string[]>((resolve) => {
        let inputBuffer = "";
        process.stdin.resume();
        process.stdin.setEncoding("utf8");
        process.stdin.on("data", (chunk) =>
            inputBuffer += chunk.toString()
        );
        process.stdin.on("end", () =>
            resolve(inputBuffer.split("\n"))
        );
    });
}

async function main() {
    const inputs: string[] = await readLines();
    const s: string = inputs[0];
    const k: number = parseInt(inputs[1]);
    
    const notOne = getNotOneIndex(s);

    if (k <= notOne) {
        console.log(1);
    } else {
        console.log(s.charAt(notOne));
    }
}

function getNotOneIndex(source: string): number {
    for (let i = 0; i < source.length; i++) {
        if (source.charAt(i) !== "1") {
            return i;
        }
    }
    return 0;
}

main();
//  [typescript]
class AtCoder {
  // 入力系
  input=[];
  input_i=-1;
  n(){
    this.input_i++;
    return Number(this.input[this.input_i]);
  }
  nn(n){
    const a=[];
    for(let i=0;i<n;i++){
      a.push(this.n());
    }
    return a;
  }
  s(){
    this.input_i++;
    return String(this.input[this.input_i]);
  }
  ss(n){
    const a=[];
    for(let i=0;i<n;i++){
      a.push(this.s());
    }
    return a;
  }

  // コンソール
  o(...a:any){
    console.log(...a);
  }

  // Math
  abs(a:number){
    return Math.abs(a);
  }
  min(...a:number[]){
    return Math.min(...a);
  }
  max(...a:number[]){
    return Math.max(...a);
  }
  floor(a:number){
    return Math.floor(a);
  }
  ceil(a:number){
    return Math.ceil(a);
  }
  round(a:number){
    return Math.round(a);
  }

  // ソート
  asc(ar:number[]){
    const t=[...ar];
    ar.sort((a,b)=>{return a-b});
  }
  desc(ar:number[]){
    const t=[...ar];
    ar.sort((a,b)=>{return b-a});
  }

  // 自作
  gcd(...arr):number{
    for(let i=0;i<arr.length-1;i++){
      let [x,y]=[arr[i],arr[i+1]];
      while(y){
        [x,y]=[y,x%y];
      }
      arr[i+1]=x;
    }
    return arr[arr.length-1];
  };
  lcm(...arr):number{
    for(let i=0;i<arr.length-1;i++){
      let [x,y]=[arr[i],arr[i+1]];
      while(y){
        [x,y]=[y,x%y];
      }
      arr[i+1]=arr[i]*arr[i+1]/x;
    }
    return arr[arr.length-1];
  };
  isPrime(n:number):boolean{
    if(n < 2) return false;
    const suq=Math.sqrt(n);
    for(let i=2;i<=suq;i++){
      if(n%i==0){
        return false;
      }
    }return true;
  };
  deduplicate(a:any[]):any[]{
    return Array.from(new Set(a));
  };
}
const o = new AtCoder()
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line',(line)=> {
  o.input.push(...line.split(/[\s]/));
});
process.stdin.on('end', ()=> {
  let [s,k]=[o.s(),o.n()],count=0
  for(let i=0;i<s.length;i++){
    if(s[i] == '1')count++
    else count+=Number(s[i])*5000000000000000
    if(count>=k){
      o.o(s[i])
      return
    }
  }
});
//  [typescript]
function main(input) {
const S = input.split("\n")[0];
const K = parseInt(input.split("\n")[1],10);
let bool = true;
if(S.length>=K&&S.charAt(K)==="1"){
for(let i=0;i<K;i++){
  if(S.charAt(i)!=="1"){bool=false;break;}
}
}
 if(bool){console.log('1');return;}
 else{console.log(S.split('').find((v)=>v!=="1"))} 
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
function main(input) {
const S = input.split("\n")[0];
const K = parseInt(input.split("\n")[1],10);
if(S.length>=K&&S.charAt(K)==="1"){
  let bool = true;
for(let i=0;i<K;i++){
  if(S.charAt(i)!=="1"){bool=false;break;}
}
  if(bool){console.log('1');return;}
}
 console.log(S.split('').find((v)=>v!=="1")) 
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [python]
print("ABC{0}".format(input()))
//  [python]
N = input()
print("ABC"+N)
//  [python]
a=input()
print("ABC" + a)
//  [python]
print("ABC",input())
//  [python]
N = int(input())

i = 1
while i < N:
  i = i*2

if i < N:
  print(i)
else:
  print(i / 2)
//  [python]
n = int(input())

ans = "{1}{2}".format("ABC",n)
print(ans)
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) {
		int num = 0;

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			num = Integer.parseInt(br.readLine());
		} catch (IOException e) {
			e.printStackTrace();
		}
		System.out.println("ABC" + num);
	}
}
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 * @throws NumberFormatException 
	 */
	public static void main(String[] args) throws NumberFormatException, IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		System.out.println("ABC"+Integer.parseInt(br.readLine()));
	}

}
//  [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 {
        out("ABC"+rd.readLine());
    }

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

    public static void main(String[] args) throws IOException {
        new Main();
    }
}
//  [java]
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int a = sc.nextInt();
		System.out.println("ABC " + a);
        }
}
//  [java]
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int a = sc.nextInt();
		System.out.println("ABC "+ a);
        }
}
//  [java]
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int a = sc.nextInt();
		System.out.println("ABC "+ a);
        }
	}
}
//  [cpp]
#include"cstdio"
int main(){
	int n;
	scanf("%d",&n);
	printf("ABC%d\n",n);
	
	return 0;
}
//  [cpp]
#include<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;

int main(){
    int t;
    while(scanf("%d",&t)!=EOF){




        printf("ABC");
        printf("%d\n",t);

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

int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  
  int n;
  cin>>n;
  
  cout<<"ABC"+n<<endl;
  
  return 0;
}
//  [cpp]
#include <bits/stdc++.h>
#define arep(a,i,n) for(ll i=(a);i<(n);i++)
#define rep(i,n) for(ll i=0;i<(n);i++)
#define cinf(x,n) for(ll i=0;i<(n);i++)cin>>x[i];
#define coutf(x,n) for(ll i=0;i<(n);i++)cout<<x[i]<<endl;
ll scan(){ll tmp;cin>>tmp;return tmp;}
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;

using namespace std;

int main(){
	cout << "ABC" << scan() << endl;
}
//  [cpp]
#include <iostream>
using namespace std;

int N;
int A[110];
int B[110];
int C[110];

int main(){
   int i=0;
   cin >> N ;
   for (i=0; i<N; i++) A[i]=i+1;
   for (i=0; i<N; i++) C[i]=i+1;
  
for(i=0;i<N;i++){
   B[i]=0;
  
   while(A[i]%2==0){  
    A[i]/=2; 
    B[i]=B[i]+1;
    }
}//ここまでで2で割れる回数は計算できている

 
  int high=B[0];
  int answer=C[0];
  
  for(i=0;i<N;i++){
  if (i==N-1) break ;
  else if(high<B[i+1]) {
    high=B[i+1];
    answer=C[i+1] ;
  }
  }
  cout << answer << endl;
}
//  [c]
#include<stdio.h>

int main(void)
{
  int N;
  scanf("%d",&N);
  printf("ABC%d\n",N);
  return 0;
}
//  [c]
#include<stdio.h>
int main(void){
	char str[3] = {'A','B','C'};
	int N;

	scanf("%d",&N);

	printf("%c%c%c%d", str[0],str[1],str[2],N);
}
//  [c]
#include <stdio.h>

int main()
{
  char c[100];
  scanf(" %s", c);
  printf("ABC%s\n", c);

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

typedef long long ll;

int main() {
	ll n;
	scanf("%lld", &n);
	for (ll i = 1; i < 8; i++) {
		if (pow(2, i) > n) {
			printf("%lld", (ll)pow(2, i - 1));
			return 0;
		}
	}

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

typedef long long ll;

int main() {
	ll n;
	scanf("%lld", &n);
	for (ll i = 1; i < 8; i++) {
		if (pow(2, i) > n) {
			printf("%lld", i - 1);
			return 0;
		}
	}

	return 0;
}
//  [c]
#include <stdo.h>
int main(void) {
  int n;
  scanf("%d",&n);
  printf("ABC%d\n",n);
}
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
	console.log("ABC" + input);
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
'use strict'

const main = input => {
	const n = input.trim()
	console.log(`ABC${n}`)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [javascript]
function main(input) {
  input=input.trim();
  const n = parseInt(input.split(" ")[0], 10);
  console.log("ABC"+n);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function main(input) {
  input = input.trim();
  const a = input.split("");
  console.log("ABC"+a);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function main(input){
    const maxNum = [1,2, 4, 8, 16, 32, 64];
    for(const i = maxNum.length-1; i >= 0; i--){
        if(input >= maxNum[i]){
            console.log(maxNum[i]);
            return 0;
        }
    }
 
}
 
main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
var readline = require('readline');
var a = readline();
console.log("ABC" + a);
//  [go]
package main

// Solution for https://atcoder.jp/contests/abc068/tasks/abc068_a

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

type contest struct {
	in  io.Reader
	out io.Writer
}

func (con *contest) Scan(a ...interface{}) (int, error) {
	return fmt.Fscan(con.in, a...)
}
func (con *contest) Scanln(a ...interface{}) (int, error) {
	return fmt.Fscanln(con.in, a...)
}
func (con *contest) Scanf(f string, a ...interface{}) (int, error) {
	return fmt.Fscanf(con.in, f, a...)
}
func (con *contest) Print(a ...interface{}) (int, error) {
	return fmt.Fprint(con.out, a...)
}
func (con *contest) Println(a ...interface{}) (int, error) {
	return fmt.Fprintln(con.out, a...)
}
func (con *contest) Printf(f string, a ...interface{}) (int, error) {
	return fmt.Fprintf(con.out, f, a...)
}
func main() {
	in := bufio.NewReader(os.Stdin)
	out := bufio.NewWriter(os.Stdout)
	defer out.Flush()
	con := &contest{in: in, out: out}
	con.main()
}

func (con *contest) main() error {
	var s string
	con.Scan(&s)
	con.Println("ABC" + s)
	return nil
}
//  [go]
package main

import "fmt"

func main() {
  var n int
  fmt.Scan(&n)
  fmt.Printf("ABC%v\n", n)
}
//  [go]
package main

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

func main() {
	fmt.Printf("ABC%s\n", readLine())
}

/////////////////////////////////////////

//func readLineInt() []int {
//	result := make([]int, 0)
//	for _, v := range strings.Split(readLine(), " ") {
//		i, _ := strconv.Atoi(v)
//		result = append(result, i)
//	}
//	return result
//}

var reader = bufio.NewReaderSize(os.Stdin, 1e6)

func readLine() string {
	result := make([]byte, 0, 1e6)
	for {
		line, remains, e := reader.ReadLine()
		if e != nil {
			panic(e)
		}
		result = append(result, line...)
		if !remains {
			break
		}
	}
	return string(result)
}
//  [go]
package main

import (
	"fmt"
)

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

	if n < 10 {
		fmt.Println("ABC00" + string(n))
	} else if n < 100 {
		fmt.Println("ABC0" + string(n))
	} else {
		fmt.Println("ABC" + string(n))
	}
}
//  [go]
package main

import "fmt"

func main() {
  var n int
  fmt.Scan(&n)
  fmt.Printf("ABC%v\n", &n)
}
//  [go]
package main

import(
  "fmt"
)

func main() {
  var n int
  fmt.Scan(&n)
  
  fmt.Println("ABC"+ n)
}
//  [ruby]
puts "ABC"+gets
//  [ruby]
puts "ABC" + gets
//  [ruby]
puts "ABC#{readline}"
//  [ruby]
puts "ABC#{puts "ABC#{gets.chomp}"et.chomp}"
//  [ruby]
a, b = gets.split(' ').map(&:to_i)
puts (a*b)/2.to_f.ceil
//  [ruby]
N = gets.to_i
 
max_count = 0
max_count_num = 1
for s in 1..N do
  count = 0
  num = s
  while (num % 2 == 0) do
    num /= 2
    count += 1
  end
 
  if (count > max_count)
    max_count = count
    max_count_num = s
  end
end
 
puts max_count_num
//  [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: i64 = read();
    println!("ABC{}", n);
}
//  [rust]
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        input_inner!{iter, $($r)*}
    };
    ($($r:tt)*) => {
        let 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")
    };
}

fn main() {
    input! {
        n: i32,
    }
    println!("ABC{}", n);
}
//  [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();
	println!("ABC{}", v[0]);
}
//  [rust]
#[allow(unused_imports)]
use std::cmp::*;
#[allow(unused_imports)]
use std::collections::*;
#[allow(unused_imports)]
use std::cmp::{min, max};
use std::io::{Write, BufWriter};
// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input {
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

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

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

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

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

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

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

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

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}
fn gcd(mut a: i32, mut b: i32) -> i32 {
    while b != 0 {
        let r = a % b;
        a = b; b = r;
    }
    a
}
fn lcm(x: i32, y: i32)->i32{
    return x /gcd(x, y) * y;
}
fn solve() {
    let out = std::io::stdout();
    let mut out = BufWriter::new(out.lock());
    macro_rules! puts {
        ($($format:tt)*) => (write!(out,$($format)*).unwrap());
    }
    input!{
        n: usize, m:usize,
        a: [(usize, usize); m], 
    }
    let mut first = vec![false; n + 5];
    let mut second = vec![false; n + 5];
    for i in 0..m{
        first[a[i].0] = true;
        second[i + 1] = if a[i].1 {true}else{false};
    }
    let mut flag = false;
    for i in 0..n{
        if first[i] && second[i]{
            flag = true;
        }
    }
    if flag{
        puts!("POSSIBLE\n");
    }else{
        puts!("IMPOSSIBLE\n");
    }

    
}

fn main() {
    // In order to avoid potential stack overflow, spawn a new thread.
    let stack_size = 104_857_600; // 100 MB
    let thd = std::thread::Builder::new().stack_size(stack_size);
    thd.spawn(|| solve()).unwrap().join().unwrap();
}
//  [rust]
import java.util.Scanner;

public class Main {
    public static void main(String args[]) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();
            System.out.println("ABC" + N);
        }
    }
}
//  [rust]
use std::io::*;
use std::str::FromStr;


fn main() {
    let n : usize = read();
    let ans = 2_u8.pow((1..n+1).map(|x| x.trailing_zeros()).max().unwrap());   
    println!("{}", ans);
}

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")
}
//  [swift]
print("ABC"+readLine()!)
//  [swift]
import Glibc
extension String: CollectionType {}

var n = Int(readLine()!)!
print("ABC\(n)")
//  [swift]
print("ABC\(readLine()!)")
//  [swift]
let s = 90
var a = 1
while s >= a {
    a *= 2
}

print(a/2)
//  [typescript]
const t={input:require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/),n:(arg:number=0):number|number[]=>{if(arg){const a=[];for(let i=0;i<arg;i++){a.push(t.n())}return a}else{const a=t.input[0];t.input.shift();return Number(a)}},s:(arg:number=0):string|string[]=>{if(arg){const a=[];for(let i=0;i<arg;i++){a.push(t.s())}return a}else{const a=t.input[0];t.input.shift();return String(a)}},c:(arg:number=0):string|string[]=>{if(arg){const a=[];for(let i=0;i<arg;i++){a.push(t.c())}return a}else{let a=t.input[0].split('');const b=a[0];a.shift();if(a.length>0){t.input[0]=a.join('')}else{t.input.shift()}return String(b)}},o:(...arg)=>{console.log(...arg)},abs:(a)=>{return Math.abs(a)},min:(...a)=>{return Math.min(...a)},max:(...a)=>{return Math.max(...a)},floor:(a)=>{return Math.floor(a)},asc:(ar:number[])=>{return ar.sort((a,b)=>{return a-b})},desc:(ar:number[])=>{return ar.sort((a,b)=>{return b-a})},sw:(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length;i+=2){if(eval(a+op+arr[i]))return arr[i+1];}return arr[arr.length-1]}};
const main=()=>{
  t.o('ABC'+t.s())
}
main()
//  [typescript]
import * as fs from 'fs';
const n : string = fs.readFileSync('/dev/stdin','utf8').trim();
console.log('ABC' + ('000'+n).slice(-3));
//  [typescript]
const stdin = require('fs').readFileSync('/dev/stdin', 'utf8')

const n = stdin.split('\n')[0]

console.log(`ABC${n}`)
//  [typescript]
const t={input:require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/),n:(arg:number=0):number|number[]=>{if(arg){const a=[];for(let i=0;i<arg;i++){a.push(t.n())}return a}else{const a=t.input[0];t.input.shift();return Number(a)}},s:(arg:number=0):string|string[]=>{if(arg){const a=[];for(let i=0;i<arg;i++){a.push(t.s())}return a}else{const a=t.input[0];t.input.shift();return String(a)}},c:(arg:number=0):string|string[]=>{if(arg){const a=[];for(let i=0;i<arg;i++){a.push(t.c())}return a}else{let a=t.input[0].split('');const b=a[0];a.shift();if(a.length>0){t.input[0]=a.join('')}else{t.input.shift()}return String(b)}},o:(...arg)=>{console.log(...arg)},abs:(a)=>{return Math.abs(a)},min:(...a)=>{return Math.min(...a)},max:(...a)=>{return Math.max(...a)},floor:(a)=>{return Math.floor(a)},asc:(ar:number[])=>{return ar.sort((a,b)=>{return a-b})},desc:(ar:number[])=>{return ar.sort((a,b)=>{return b-a})},sw:(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length;i+=2){if(eval(a+op+arr[i]))return arr[i+1];}return arr[arr.length-1]}};
const main=()=>{
// let [a,b] = t.c(2)
  t.o('ABC'+t.c())
}
main()
//  [python]
from bisect import bisect_left, bisect_right
n = int(input())
l = list(map(int, input().split()))
l.sort()

ans = 0
for j in range(n):
    for k in range(j + 1, n):
        if l[j] == l[k]:
            continue

        ans += max(bisect_left(l, l[j]) - bisect_right(l, l[k] - l[j]), 0)

print(ans)
//  [python]
import sys
from bisect import bisect_left, bisect_right


def input():
    return sys.stdin.readline().rstrip()


def main():
    N = int(input())
    L = list(map(int, input().split()))

    L.sort()
    count = 0

    for j in range(1, N - 1):
        rem = L[j + 1:]
        for i in range(j):
            if L[i] == L[j]:
                break

            count += bisect_left(rem, L[i] + L[j]) - bisect_right(rem, L[j])

    print(count)


if __name__ == "__main__":
    main()
//  [python]
import sys
from bisect import bisect_left, bisect_right


def input():
    return sys.stdin.readline().rstrip()


def main():
    N = int(input())
    L = list(map(int, input().split()))

    L.sort()
    count = 0

    for j in range(1, N - 1):
        for i in range(j):
            if L[i] == L[j]:
                break

            count += bisect_left(L[j + 1:], L[i] + L[j]) - bisect_right(L[j + 1:], L[j])

    print(count)


if __name__ == "__main__":
    main()
//  [python]
N = int(input())
hen = []

hen = list(int(x) for x in input().split())

#print(hen)
hen_u = set(hen.sort())
#print(hen_u)
tri = 0

for a in hen_u:
    for b in hen_u:
        if(a == b):
            continue
        for c in hen_u:
            if(a == c)or(b == c):
                continue
            if(a+b >c)and(b+c >a)and(c+a >b):
                tri += 1

print(tri)
//  [python]
n=int(input())
a=list(map(int,input().split()))
count=0
for i in a:
  s=a[i]
  for j in range(i+1,len(a)):
    t=a[j]
    if len(a)<=2:
      break
    for k in range(j+1,len(a)+1):
      b=a[k]
      c=max(s,t,b)
      d=min(s,t,b)
      mid=s+t+b-c-d
      if (mid-d)<c<mid+d:
        count+=1
print(count)
//  [python]
n=int(input())
a=list(map(int,input().split()))
count=0
for i in a:
  s=a[i]
  for j in range(i+1,len(a)):
    t=a[j]
    if len(a)<=2:
      break
    for k in range(j+1,len(a)+1):
      b=a[k]
      c=max(s,t,b)
      d=min(s,t,b)
      mid=s+t+b-c-d
      if (c-mid)<d and (d+mid)>c:
        count+=1
print(count)
//  [java]
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        List<Integer> sticks = new ArrayList<Integer>();
        for(int i = 0; i< N; i++){
            sticks.add(scan.nextInt());
        }

        scan.close();
        int count = sticks.size();
        int ans = 0;


        for (int i = 0; i < count; i++){
            for (int j = 0; j < i; j++){
                for (int k = 0; k < j; k++){
                    
                    // 異なる数字であるか
                    if(sticks.get(i) == sticks.get(j) || sticks.get(j) == sticks.get(k) || sticks.get(k) == sticks.get(i)){
                        continue;
                    }

                    // 三角形の成立条件を満たすか
                    if(sticks.get(i) + sticks.get(j) > sticks.get(k) && sticks.get(j) + sticks.get(k) > sticks.get(i) && sticks.get(k) + sticks.get(i) > sticks.get(j)){
                        ans++;
                    }

                }
            }
        }

        System.out.println(ans);


    }

}
//  [java]
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        List<Integer> sticks = new ArrayList<Integer>();
        for(int i = 0; i< N; i++){
            sticks.add(scan.nextInt());
        }

        scan.close();
        int count = sticks.size();
        int ans = 0;

        if (count < 3){
            System.out.println(0);
            return;
        }

        for (int i = 0; i < count - 2; i++){
            for (int j = i + 1; j < count - 1; j++){
                for (int k = j + 1; k < count; k++){
                    
                    // 異なる数字であるか
                    if(sticks.get(i) == sticks.get(j) || sticks.get(j) == sticks.get(k) || sticks.get(k) == sticks.get(i)){
                        continue;
                    }

                    // 三角形の成立条件を満たすか
                    if(sticks.get(i) + sticks.get(j) > sticks.get(k) && sticks.get(j) + sticks.get(k) > sticks.get(i) && sticks.get(k) + sticks.get(i) > sticks.get(j)){
                        ans++;
                    }

                }
            }
        }

        System.out.println(ans);


    }

}
//  [java]
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        List<Integer> sticks = new ArrayList<Integer>();
        for(int i = 0; i< N; i++){
            sticks.add(scan.nextInt());
        }

        scan.close();
        int count = sticks.size();
        int ans = 0;

        for (int i = 0; i < count - 2; i++){
            for (int j = i + 1; j < count - 1; j++){
                for (int k = j + 1; k < count; k++){
                    
                    // 異なる数字であるか
                    if(sticks.get(i) == sticks.get(j) || sticks.get(j) == sticks.get(k) || sticks.get(k) == sticks.get(i)){
                        continue;
                    }

                    // 三角形の成立条件を満たすか
                    if(sticks.get(i) + sticks.get(j) > sticks.get(k) && sticks.get(j) + sticks.get(k) > sticks.get(i) && sticks.get(k) + sticks.get(i) > sticks.get(j)){
                        ans++;
                    }

                }
            }
        }

        System.out.println(ans);


    }

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

typedef long long int ll;
#define deb(x) cout << #x << " " << x << endl;
#define debtwo(x,y) cout << #x << " " << x << ", " << #y << " " << y << endl;
#define mod 1000000000000000000

int main()
{
  int n;
  cin >> n;
  vector<ll> arr(n);

  for (int i = 0; i < n; i++) cin >> arr[i];

  sort(arr.begin(), arr.end());
  // for (int i = 0; i < n; i++) cout << arr[i] << " ";
  // cout << endl;
  int c = 0;
  for (int i = 0; i < arr.size() - 2; i++) {
    auto it = upper_bound(arr.begin(), arr.end(), arr[i]);
    if (it == arr.end()) break;
    while (it != arr.end()) {
      int sec = *it;
      it++;
      auto it2 = it;
      //debtwo(arr[i], sec)
      while (it2 != arr.end() && (*it2 < arr[i] + sec)) {
        if (*it2 != sec)c++;
        it2++;
      }
      //deb(c) //1 4 6 6 6 6 8 9 9 10
    }
    // while (i < arr.size() && arr[i + 1] == arr[i]) {
    //   // debtwo(arr[i], arr[i + 1])
    //   // cout << i << endl;
    //   i++;
    // }

  }
  cout << c;
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
const int N = 1e5 + 7;
int a[300];

bool judge(int x, int y, int z) {
    if (x == y || x == z || y == z) 
        return false;
    if (x + y > z && (abs(x  - y) < z)) {
        return true;
    }
    return false;
}

int main() {
    int n;
    cin >> n;
    int ans = 0;
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    for (int i = 1; i <= n; i++) {
        for (int j = i + 1; j <= n; j++) {
            for (int k = j + 1; k <= n; k++) {
                if (judge(a[i], a[j], a[k])) {
                    ans++;
                }
            }
        }
    }
    cout << ans << endl;
}
//  [cpp]
#include <bits/stdc++.h>

using namespace std;

int main() {
	int n;

	cin >> n;

	vector <int> L(n);

	for (int i = 0; i < n; i++) {
		cin >> L[i];
	}

	sort(L.begin(), L.end());

	int ans = 0;

	for (int i = 0; i < n; i++) {
		for (int j = i+1; j < n; j++) {
			if (L[i] == L[j]) {
				continue;
			}
			for (int k = j+1; k < n; k++) {
				if (L[j] == L[k]) {
					continue;
				}
				if (L[i] + L[j] > L[k]) {
					ans++;
				}
			}
		}
	}

	cout << ans << "\n";

	return 0;
}
//  [cpp]
#include<cstdio>
#include<iostream>
#include<string>
#include<algorithm>
#include<stdio.h>
#include<locale.h>
#include<math.h>
#include<set>
#include<stack>
#include<queue>
using namespace std;
int main()
{
 int n,l[102],ans=0;
 scanf("%d",&n);
 for(int i=0;i<n;i++)
 {
	scanf("%d",&l[i]);
 }
 for(int i=0;i<n;i++)
 {
	for(int j=i+1;j<n;j++)
	{
		for(int k=j+1;k<n;k++)
		{
		 if(l[i]+l[j]>l[k]&&l[i]+l[k]>l[j]&&l[j]+l[k]>l[i]){if(l[i]==l[j]&&l[j]==l[k]){}else{ans++;}}
		}
	}
 }
 printf("%d",ans);
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;

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

    int l[n];
    for(int i = 0; i < n; i++)
        cin >> l[i];

    int cnt = 0;
    for(int i = 0; i < n; i++){
        for(int j = i + 1; j < n; j++){
            for(int k = j + 1; k < n; k++){
                if(l[i] != l[j] && l[j] != l[k] && l[k] != l[i])
                    cnt++;
            }
        }
    }

    cout << cnt << endl;

    return 0;
}
//  [cpp]
#include <bits/stdc++.h>
#define ll long long
#define PI acos(-1)
using namespace std;
const ll N = 1e5+100;
const ll MOD = 1e9+7;

ll n,m,T;
ll l[110];
int main()
{
	/*scanf("%d",&T);
	while(T--)
	{
	
	 } 
	 */
	scanf("%lld",&n);
	for(ll i=1;i<=n;i++)
	{
		scanf("%lld",&l[i]);
	}
	ll ans = 0;
	for(ll i=1;i<=n;i++)
	for(ll j=i+1;j<=n;j++)
	for(ll k=j+1;k<=n;k++)
	{
		ll a = l[i], b = l[j], c = l[k];
		if(a+b>c&&a+c>b&&b+c>a)	ans++;
		
	}	
	printf("%lld\n",ans);
	return 0;
}
//  [c]
#include<stdio.h>
#include<stdlib.h>

int compare_int(const void *a, const void *b)
{
  return *(int*)a-*(int*)b;
}

int main()
{
  int n,i,j,k;
  int l[101];
  int ans=0;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&l[i]);
  }
  qsort(l,n,sizeof(int),compare_int);
  for(i=0;i<n;i++){
    for(j=i+1;j<n;j++){
      for(k=j+1;k<n;k++){
        if( (l[i]==l[j]) || (l[j]==l[k]) || (l[k]==l[i]) ) continue;
        if( l[i]+l[j]>l[k] ) ans++;
      }
    }
  }
  printf("%d",ans);
  return 0;
}
//  [c]
#include <stdio.h>
int main(void){
    // Your code here!
    int n, i, ii, iii, ans = 0;
    long long int l[101], tmp, sum;

    scanf("%d", &n);
    for (i = 0; i < n; i++)
        scanf("%lld", l + i);
    for (i = 0; i < n; i++)
        for (ii = i + 1; ii < n; ii++)
            for (iii = ii + 1; iii < n; iii++)
                if (l[i] != l[ii] && l[i] != l[iii] && l[ii] != l[iii])
                {
                    tmp = l[i];
                    if (l[ii] > tmp)
                        tmp = l[ii];
                    if (l[iii] > tmp)
                        tmp = l[iii];
                    sum = l[i] + l[ii] + l[iii];
                    if (sum - tmp * 2 > 0)
                        ans++;
                }
    printf("%d", ans);
                    
}
//  [c]
#include <stdio.h>
#include <stdlib.h>
int desc(const void *x, const void *y){
    return *(int *)x - *(int *)y;
}
int main(void){
    int n,i,j,k,cnt=0;
    scanf("%d",&n);
    int l[n];
    for(i=0;i<n;i++) scanf("%d",&l[i]);
    qsort(l,n,sizeof(int),desc);
    for(i=0;i<n;i++){
        for(j=0;j<i;j++){
            for(k=0;k<j;k++){
                if(l[i]!=l[j] && l[j]!=l[k] && l[k]+l[j]>l[i]) cnt++;
            }
        }
    }
    printf("%d",cnt);
    return 0;
}
//  [c]
#include<stdio.h>

int main(void){
  int n,tmp,c=0;
  scanf("%d",&n);
  int l[n];
  for(int i=0;i<n;i++){
    scanf("%d",&l[i]);
  }
  
  for(int i=0;i<n;i++){
    for(int j=i+1;j<n;j++){

      if(l[i]>l[j]){
        tmp=l[i];
        l[i]=l[j];
        l[j]=tmp;
      }
    }
  }
  
  for(int i=0;i<n;i++){
    for(int j=i+1;j<n;j++){
      for(int k=j+1;k<n;k++){
        if(l[i]!=l[j] && l[j]!=l[k] && l[k]+l[j]>l[i]){
          c++;
        }
      }
    }
  }
  printf("%d\n",c);
return 0;
}
//  [c]
#include <stdio.h>
#include <stdlib.h>

int main(){
    
int N,L[N+1],i=0,j=1,num=0,A=0,B=0;

scanf("%d",&N);
    
for(i;i<N;i++){
    scanf("%d",&L[i]);
}


for(j;j < (N-1);j++){
    for(int k=j+1;k<N;k++){
        for(int l=k+1;l<(N+1);l++){
            
            if((L[j-1] != L[k-1]) & (L[j-1] != L[l-1]) & (L[k-1] != L[l-1])){
                
                if((L[j-1] < (L[k-1]+L[l-1])) & (L[k-1] < (L[j-1]+L[l-1])) & (L[l-1] < (L[j-1]+L[k-1]))){
                    num++;
                    }
                else{num+=0;}
            }
            else{num+=0;}
        }
    }


}

printf("%d",num);

return 0;







}
//  [c]
#include<stdio.h>
int buble(int a,int b[200]){
  int j,i,tmp;
  for(i=0;i<a;i++){
    for(j=0;j<a;j++){
      if(b[i]>b[j]){
        tmp=b[i];
        b[i]=b[j];
        b[j]=tmp;
      }
    }
  }
  return b;
}

int main(){
  int n,a,b,c,k,l,d,e,f,p,count=0;
  scanf("%d",&n);
  for(p=0;p<=n;p++){
    scanf("%d,&l[p]");
  }
  l[200]=buble(n,l);
  p=(n*n*n-3*n*n+2*n)/6;
  for(d=0;d<n;d++){
    for(e=d+1;e<n;e++){
      for(f=e+1;f<n;f++){
        if(l[d]>=l[e]+l[f]||l[d]==l[e]||l[e]==l[f]){
          count++;
        }
      }
    }
  }
  count=p-count;
  printf("%d",count);
  return 0;
}
//  [javascript]
function Main(input) {
  input=input.split("\n");
  const N=input[0]-0;
  var array=input[1].split(' ').map(e=>{
    return e-0;
  }).sort((a,b)=>{
    return a-b;
  });
  var ans=0;
  //console.log(array);
  for(var i=0;i<N-2;i++){
    for(var j=i+1;j<N-1;j++){
      for(var k=j+1;k<N;k++){
        if(array[i]===array[j]){
          break;
        }
        if(array[j]===array[k]){
          continue;
        }
        if(array[i]+array[j]<=array[k]){
          break;
        }
        //console.log(i,j,k);
        ans++;
      }
    }
  }
  console.log(ans);
}


//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function main(input){
  input = input.split('\n');
  const N = Number(input[0]);
  const list = input[1].split(' ').map(Number);

  let sum = 0;
  for(let i=0; i<N; i++){
    for(let j=i+1; j<N; j++){
      for(let k=j+1; k<N; k++){
        const a = list[i];
        const b = list[j];
        const c = list[k];
        if(a!=b &&  b!=c && c!=a){
          if(
              ((a+b) > c)
            && ((b+c) > a)
            && ((c+a) > b)
          ){
            sum++;
          }
        }
      }
    }
  }

  console.log(sum);

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