jiahuimbzuai/CoQuIR huggingface dataset:
//  [c]
#include <float.h>
#include <inttypes.h>
#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <math.h>
#ifdef __cplusplus
#include <bits/stdc++.h>
#endif

__asm__ (
	"asm_my_gcd2_in:"
	"movl $0, %edx;"
	"divl %ecx;"
	"cmpl $0, %edx;"
	"jz asm_my_gcd2_in2;"
	"asm_my_gcd2_in1:"
	"movl %ecx, %eax;"
	"movl %edx, %ecx;"
	"movl $0, %edx;"
	"divl %ecx;"
	"cmpl $0, %edx;"
	"jnz asm_my_gcd2_in1;"
	"asm_my_gcd2_in2:"
	"ret;"
);

inline int gcd(uint32_t a, uint32_t b){
	if(a==0 || b==0) return a==0?b:a;
	uint32_t ans;
	__asm__ (
	"movl %1, %%ecx;"
	"movl %2, %%eax;"
	"call asm_my_gcd2_in;"
	"movl %%ecx, %0;"
		:"=r"(ans)
		:"r"(a),"r"(b)
		:"%eax", "%ecx", "%edx", "cc"
		);
	return ans;
}

uint32_t nextpint(void){ char c=getc_unlocked(stdin); while(c<'0'||'9'<c) c=getc_unlocked(stdin); uint32_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getc_unlocked(stdin); } return x; }
int a[100001];
int l[100002], r[100002];
int main(void){
	int n=nextpint();
	for(int i=1; i<=n; i++){
		a[i]=nextpint();
	}
	l[0]=0;
	for(int i=1; i<=n; i++){
		l[i] = gcd(l[i-1], a[i]);
	}
	r[n+1]=0;
	for(int i=n; i>0; i--){
		r[i] = gcd(r[i+1], a[i]);
	}
	int max=0;
	for(int i=1; i<=n; i++){
		int now=gcd(l[i-1], r[i+1]);
		if(now>max) max=now;
	}
	printf("%d\n", max);
}
//  [c]
G(int a,int b){
	if(a==0||b==0)return(a>b?a:b);
	if(a%b==0)return b;
	return G(b,a%b);
}
main(){
	int i,n,a[100002],l[100002]={0},r[100002]={0},ans=0;
	scanf("%d",&n);
	for(i=1;i<=n;i++){scanf("%d",&a[i]);l[i+1]=G(a[i],l[i]);}
	for(i=n;i>0;i--)r[i]=G(a[i],r[i+1]);
	for(i=1;i<=n;i++)ans=(ans>G(l[i],r[i+1])?ans:G(l[i],r[i+1]));
	printf("%d",ans);
}
//  [c]
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>

#define REP(i,n) for(i=0;i<n;i++)

//prototype declaration
int iin();
long long llin();
double din();
char cin();
void stin(char *s);
void iout(int i);
void llout(long long i);
void dout(double i);
void cout(char c);
void stout(char *s);
int dfs(int v, int n, int *visited, int table[n][n]);
int gcd(int a, int b);
int lcm(int a, int b);
long long llgcd(long long a, long long b);
long long lllcm(long long a, long long b);

//main function
int main() {
    int n = iin(), i;
    if (n == 2) {
        int a = iin(), b = iin();
        iout(a > b ? a : b);
        return 0;
    }
    int a1 = iin(), a2 = iin(), a3 = iin(), hold, gcdmax;
    if (gcd(a1, a2) >= gcd(a2, a3) && gcd(a1, a2) >= gcd(a1, a3)) {
        gcdmax = gcd(a1, a2);
        hold = a3;
    } else if (gcd(a2, a3) > gcd(a1, a2) && gcd(a2, a3) > gcd(a1, a3)) {
        gcdmax = gcd(a2, a3);
        hold = a1;
    } else if (gcd(a1, a3) > gcd(a1, a2) && gcd(a1, a3) > gcd(a2, a3)) {
        gcdmax = gcd(a1, a3);
        hold = a2;
    }
    REP(i, n - 3) {
        a1 = iin();
        if (gcd > gcd(gcdmax, a1)) {
            if (gcd(gcdmax, a1) < gcd(gcdmax, hold)) {
                gcdmax = gcd(gcdmax, hold);
                hold = a1;
            } else {
                gcdmax = gcd(gcdmax, a1);
            }
        }
    }
    iout(gcdmax);
    return 0;
}

//body function
int iin() {
    int i;
    scanf("%d", &i);
    return i;
}

long long llin() {
    long long i;
    scanf("%lld", &i);
    return i;
}

double din() {
    double i;
    scanf("%lf", &i);
    return i;
}

char cin() {
    char c;
    scanf("%c", &c);
    return c;
}

void stin(char *s) {
    scanf("%s", s);
}

void iout(int i) {
    printf("%d\n", i);
}

void llout(long long i) {
    printf("%lld\n", i);
}

void dout(double i) {
    printf("%lf\n", i);
}

void cout(char c) {
    printf("%c\n", c);
}

void stout(char *s) {
    printf("%s\n", s);
}

int dfs(int v, int n, int *visited, int table[n][n]) {
    int all_visited = 1, i;

    REP(i,n) {
        if (!visited[i]) {
            all_visited = 0;
            break;
        }
    }

    if (all_visited) {
        return 1;
    }

    int count = 0;

    REP(i,n) {
        if (!table[v][i]) continue;
        if (visited[i]) continue;

        visited[i] = 1;
        count += dfs(i, n, visited, table);
        visited[i] = 0;
    }

    return count;
}

int gcd(int a, int b) {
    int r;

    if (a < b) {
        r = a;
        a = b;
        b = r;
    }

    r = a % b;
    while (r != 0) {
        a = b;
        b = r;
        r = a % b;
    }

    return b;
}

int lcm(int a, int b) {
    int r = llgcd(a, b);
    a /= r;
    return a * b;
}

long long llgcd(long long a, long long b) {
    long long r;

    if (a < b) {
        r = a;
        a = b;
        b = r;
    }

    r = a % b;
    while (r != 0) {
        a = b;
        b = r;
        r = a % b;
    }

    return b;
}

long long lllcm(long long a, long long b) {
    long long r = llgcd(a, b);
    a /= r;
    return a * b;
}
//  [c]
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
#include<string.h>
#include<math.h>
#include<ctype.h>

typedef long long ll;

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

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

ll max(ll a, ll b) { return (a > b) ? a : b; }

ll min(ll a, ll b) { return (a < b) ? a : b; }

ll asc(const void* a, const void* b) { return *(ll*)a - *(ll*)b; }

ll dsc(const void* a, const void* b) { return *(ll*)b - *(ll*)a; }

bool flag;

int main() {
	ll n, a[100000];
	scanf("%lld", &n);
	for (ll i = 0; i < n; i++) scanf("%lld", &a[i]);
	ll gcdA = a[0], gcdB = a[1];
	for (ll i = 1; i < n; i++) {
		if (!flag&&(gcd(gcdA, a[i]) == 1)) { flag = true; }
		else gcdA = gcd(gcdA, a[i]);
		gcdB = gcd(gcdB, a[i]);
	}
	ll gcdC = a[0] / gcdA;
	if (flag) { printf("%lld", max(gcdA, gcdB)); return 0; }
	else {
      	flag=false;
      	gcdB=a[1]/gcdA;
		for (int i = 1; i < n; i++){
			a[i] /= gcdA;
			if(!flag&&(gcd(gcdC,a[i])==1)) flag=true;
          	else gcdC = gcd(gcdC, a[i]);
          	gcdB = gcd(gcdB, a[i]);
		}
		printf("%lld", max(gcdC * gcdA, gcdB*gcdA));
    }
	
	return 0;
}
//  [c]
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
#include<string.h>
#include<math.h>
#include<ctype.h>

typedef long long ll;

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

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

ll max(ll a, ll b) { return (a > b) ? a : b; }

ll min(ll a, ll b) { return (a < b) ? a : b; }

ll asc(const void* a, const void* b) { return *(ll*)a - *(ll*)b; }

ll dsc(const void* a, const void* b) { return *(ll*)b - *(ll*)a; }

bool flag;

int main() {
	ll n, a[100000];
	scanf("%lld", &n);
	for (ll i = 0; i < n; i++) scanf("%lld", &a[i]);
	ll gcdA = a[0], gcdB = a[1];
	for (ll i = 1; i < n; i++) {
		if (gcd(gcdA, a[i]) == 1) { flag = true; }
		else gcdA = gcd(gcdA, a[i]);
		gcdB = gcd(gcdB, a[i]);
	}
	ll gcdC=1;
	if (!flag) {
      	gcdC=a[0]/gcdA;
		for (int i = 0; i < n; i++) a[i] /= gcdA;
		for (int i = 1; i < n; i++) {
			if(gcd(gcdC,a[i])!=1) gcdC = gcd(gcdC, a[i]);
		}
	}
	printf("%lld", max(gcdC * gcdA, gcdB));
	
	return 0;
}
//  [c]
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
#include<string.h>
#include<math.h>
#include<ctype.h>

typedef long long ll;

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

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

ll max(ll a, ll b) { return (a > b) ? a : b; }

ll min(ll a, ll b) { return (a < b) ? a : b; }

ll asc(const void* a, const void* b) { return *(ll*)a - *(ll*)b; }

ll dsc(const void* a, const void* b) { return *(ll*)b - *(ll*)a; }

bool flag;

int main() {
	ll n, a[100000];
	scanf("%lld", &n);
	for (ll i = 0; i < n; i++) scanf("%lld", &a[i]);
	ll gcdA = a[0], gcdB = a[1];
	for (ll i = 1; i < n; i++) {
		if (gcd(gcdA, a[i]) != 1) gcdA = gcd(gcdA, a[i]);
		else flag = true;
		gcdB = gcd(gcdB, a[i]);
	}
  	ll gcdC = a[0]/gcdA;
	if (!flag) {
		for (int i = 0; i < n; i++) a[i] /= gcdA;
      	gcdB = a[1];
		for (ll i = 1; i < n; i++) {
			if (gcd(gcdC, a[i]) != 1) gcdC= gcd(gcdC, a[i]);
		}
	}
	printf("%lld", (gcdC*gcdA > gcdB) ? gcdC*gcdA : gcdB);

	return 0;
}
//  [javascript]
console.log((args=>{
  const [[N],A] = args.trim().split('\n').map(r=>r.split(' ').map(v=>v|0));
  if ( N === 2 ) return `${Math.max(...A)}`;
  const D = [A[0],A[1]];
  for ( let i = 0; i < 2; i++ ) {
    let a = A[i];
    for ( let j = 2; j*j <= a; j++ ) {
      if ( a % j ) continue;
      D.push( j, a / j );
    }
  }
  D.sort((a,b)=>b-a);
  DIVISOR: for( const d of D ) {
    let n = 0;
    for ( let i = 0; i < N; i++ ) {
      if ( A[i] % d && ++n > 1 ) continue DIVISOR;
    }
    return `${d}`;
  }
  return '1';
})(require('fs').readFileSync('/dev/stdin', 'utf8')));
//  [javascript]

"use strict";

process.stdin.resume();
process.stdin.setEncoding('utf8');

var g_input = '';
process.stdin.on('data', function(chunk) {
    g_input += chunk;
});

process.stdin.on('end', function() {
    Main(g_input.split(/\r?\n/));
});

function Main(input) {

    const n = parseInt(input[0], 10);
    const a = input[1].split(' ').map(function(value) { return parseInt(value, 10); });
    let l = Array(n + 1);
    let r = Array(n + 1);
    let ans = 0;

    l[0] = 0;
    for (let i = 1; i < n; i++) {
        l[i] = gcd(l[i - 1], a[i - 1]);
    }

    r[n - 1] = 0;
    for (let i = n - 2; i >= 0; i--) {
        r[i] = gcd(r[i + 1], a[i + 1]);
    }

    for (let i = 0; i < n; i++) {
        ans = Math.max(ans, gcd(l[i], r[i]));
    }

    console.log(ans);

    return 0;
}

function gcd(a, b) {

    if (b === 0) {
        return a;
    } else {
        return gcd(b, a % b);
    }
}
//  [javascript]
module.exports=function(t){var r={};function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var i in t)e.d(n,i,function(r){return t[r]}.bind(null,i));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=0)}([function(t,r,e){"use strict";var n=e(1);e(2)(n.readFileSync("/dev/stdin","utf8"))},function(t,r){t.exports=require("fs")},function(t,r,e){"use strict";var n=e(3),i=e(5);t.exports=function(t){var r=new n(t);i(r)}},function(t,r,e){"use strict";var n=e(4);t.exports=class{constructor(t){var r=t.trim().split(/\s+/g);this.inp=new n(r)}inr(){return this.inp.deq()}in(){return parseInt(this.inp.deq(),10)}fin(){this.inp.clear()}}},function(t,r,e){"use strict";t.exports=class{constructor(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.size=t.length,this.items=t,this.ind=0}enq(t){this.size+=1,this.items.push(t)}deq(){var t=this.items[this.ind];return this.size-=1,this.ind+=1,t}clear(){this.items=[],this.size=0,this.ind=0}}},function(t,r,e){"use strict";function n(t,r){var e=Math.max(t,r),n=Math.min(t,r);if(e==n)return e;for(;0!=n;){var i=n;n=e%n,e=i}return e}t.exports=function(t){for(var r=t.in(),e=new Array(r),i=0;i<r;i++)e[i]=t.in();var o=new Array(r+1);o[0]=0;var s=new Array(r+1);s[r]=0;for(var u=0;u<r;u++)o[u+1]=n(o[u],e[u]),s[r-1-u]=n(s[r-u],e[r-1-u]);for(var a=1,c=0;c<r;c++){var f=n(o[c],s[c+1]);a=Math.max(a,f)}console.log(a)}}]);
//  [javascript]
console.log((args=>{
  const [[N],A] = args.trim().split('\n').map(r=>r.split(' ').map(v=>v|0));
  if ( N === 2 ) return `${Math.max(...A)}`;
  const D = [A[0],A[1]];
  for ( let i = 0; i < 2; i++ ) {
    let a = A[i];
    for ( let j = 2; j*j <= a; j++ ) {
      if ( a % j ) continue;
      let k = 0;
      while ( a % j === 0 ) D.push( j * ++k, a /= j );
    }
  }
  D.sort((a,b)=>b-a);
  DIVISOR: for( const d of D ) {
    let n = 0;
    for ( let i = 0; i < N; i++ ) {
      if ( A[i] % d && ++n > 1 ) continue DIVISOR;
    }
    return `${d}`;
  }
  return '1';
})(require('fs').readFileSync('/dev/stdin', 'utf8')));
//  [javascript]
console.log((args=>{
  const [[N],A] = args.trim().split('\n').map(r=>r.split(' ').map(v=>v|0));
  const gcd = (a,b) => {while(a)[a,b]=[b%a,a];return b;};
  if ( N === 2 ) return `${Math.max(...A)}`;
  const D = [gcd(A[0],A[A.length-1])];
  for( let i = 0; i < N - 1; i++ ) {
    D.push( gcd(A[i],A[i+1]) );
  }
  D.sort((a,b)=>b-a);
  DIVISOR: for( const d of D ) {
    let n = 0;
    for ( let i = 0; i < N; i++ ) {
      if ( A[i] % d && ++n > 1 ) continue DIVISOR;
    }
    return `${d}`;
  }
  return '1';
})(require('fs').readFileSync('/dev/stdin', 'utf8')));
//  [javascript]
// 最大公約数
_gcd = function(m, n, t) {
    if (n == 0) {
        console.log(m, n)
        return m
    }
	while (m % n !== 0) {
		t = n;
		n = m % n;
		m = t;
	}
	return n;
}

input = require('fs').readFileSync('/dev/stdin', 'utf8')
lines = input.split('\n')
N = lines.shift() * 1
A = lines.shift().split(' ')

B = [0]
for (i=0; i<N; i++) {
    B[i+1] = _gcd(B[i], A[i])
}

C = []
C[N] = 0
for (i=N-1; i >=0; i--) {
    C[i] = _gcd(C[i+1], A[i])
}

max = 0
for (i=0; i<N; i++) {
    gcd = _gcd(B[i], C[i+1])
    if (max < gcd) {
        max = gcd
    }
}

console.log(max)
//  [go]
// 別解

package main

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

var sc = bufio.NewScanner(os.Stdin)

func ri() (n int) {
	sc.Scan()
	for _, v := range sc.Bytes() {
		n = n*10 + int(v-48)
	}
	return
}

func main() {
	sc.Split(bufio.ScanWords)
	n := ri()
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = ri()
	}

	cs := make([]int, 0, 200000)
	x := a[0]
	for i := 1; i*i <= x; i++ {
		if x%i == 0 {
			cs = append(cs, i, x/i)
		}
	}
	y := a[1]
	for i := 1; i*i <= y; i++ {
		if y%i == 0 {
			cs = append(cs, i, y/i)
		}
	}
	sort.Sort(sort.Reverse(sort.IntSlice(cs)))

	for i := 0; i < len(cs); i++ {
		indivisible := 0
		for _, aa := range a {
			if aa%cs[i] != 0 {
				indivisible++
			}
			if indivisible >= 2 {
				break
			}
		}
		if indivisible <= 1 {
			fmt.Println(cs[i])
			return
		}
	}
}
//  [go]
package main

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

var sc = bufio.NewScanner(os.Stdin)

func ri() (n int) {
	sc.Scan()
	for _, v := range sc.Bytes() {
		n = n*10 + int(v-48)
	}
	return
}

func gcd(a, b int) int {
	for b != 0 {
		c := a % b
		a, b = b, c
	}
	return a
}

func main() {
	sc.Split(bufio.ScanWords)
	n := ri()
	a := make([]int, n)
	for i := 0; i < n; i++ {
		a[i] = ri()
	}
	cL := make([]int, n)
	gcdL := a[0]
	for i := 0; i < n; i++ {
		gcdL = gcd(gcdL, a[i])
		cL[i] = gcdL
	}
	cR := make([]int, n)
	gcdR := a[n-1]
	for i := n - 1; i >= 0; i-- {
		gcdR = gcd(gcdR, a[i])
		cR[i] = gcdR
	}
	cL = append([]int{cR[n-1]}, cL[:n-1]...)
	cR = append(cR[1:], cL[1])
	mx := -1
	for i := 0; i < n; i++ {
		if x := gcd(cL[i], cR[i]); x > mx {
			mx = x
		}
	}
	fmt.Println(mx)
}
//  [go]
package main

import (
	"bufio"
	"fmt"
	basicIO "io"
	"math"
	"os"
	"strconv"
)

func main() {
	protagonist(os.Stdin, os.Stdout)
}

func protagonist(r basicIO.Reader, w basicIO.Writer) {
	io := NewIO(r, w)
	N, _ := io.nextInt()
	A := make([]int, N)

	min := math.MaxInt64
	sec := math.MaxInt64
	for i := 0; i < N; i++ {
		A[i], _ = io.nextInt()
		if A[i] < sec {
			if A[i] < min {
				sec = min
				min = A[i]
			} else {
				sec = A[i]
			}
		}
	}

	solution := 1

	for num := sec; num > 0; num-- {
		isLimit := false
		for j := 0; j < N; j++ {
			if A[j]%num == 0 {
				continue
			}
			if isLimit {
				goto NotFound
			}
			isLimit = true
		}
		solution = num
		goto Done
	NotFound:
	}

Done:
	io.PutInt(solution)
}

type IO struct {
	Scanner *bufio.Scanner
	Writer  basicIO.Writer
}

func NewIO(r basicIO.Reader, w basicIO.Writer) *IO {
	s := bufio.NewScanner(r)
	s.Split(bufio.ScanWords)
	return &IO{
		Scanner: s,
		Writer:  w,
	}
}

func (io *IO) nextString() string {
	io.Scanner.Scan()
	return io.Scanner.Text()
}

func (io *IO) nextInt() (int, error) {
	io.Scanner.Scan()
	i, err := strconv.Atoi(io.Scanner.Text())
	return i, err
}

func (io *IO) PutInt(v int) {
	fmt.Fprintf(io.Writer, "%d\n", v)
}

func (io *IO) PutString(s string) {
	fmt.Fprintf(io.Writer, "%s\n", s)
}
//  [ruby]
MOD=10**9+7
cnt=0; sum=0; prev=nil; can=true; h=Hash.new(0)
def gs() gets.chomp end
def gi() gets.to_i end
def gsmi() gets.chomp.split.map(&:to_i) end

def desc(ar) ar.sort!{|x,y|y<=>x} end
def min(a,b) a<=b ? a : b end
def max(a,b) a>=b ? a : b end
def sum(ar) ar.inject(:+) end

def C(a,b) b==0||a==b ? 1 : (b=a-b if a/2<b;(a-b+1..a).inject(:*)/(1..b).inject(:*)) end

def puts_yesno(can) puts(can ? 'Yes' : 'No') end
def putsend(s) puts s; exit end
def debug(k,v) puts "#{k}:#{v}" end
########### ( ˘ω˘ )ｽﾔｧ… ###########
require 'prime'
def divisors(num)
  return [1] if num == 1

  pows = []
  # 0乗、1乗・・・した値を入れる
  num.prime_division.each do |b, r|
    pow = []
    0.upto(r).each do |n|
      pow << b ** n
    end

    pows << pow
  end

  first_array = pows.shift
  return first_array if pows.size == 0

  result = first_array.product(*pows)
  result.map do |item|
    item.inject { |sum, i| sum * i }
  end.sort
end

n=gi
a=gsmi

ans=1

# 最小2つの約数のどれかが答え
mins=a.min(2)
lcms = desc (divisors(mins[0])+divisors(mins[1])).uniq
lcms.each do |num|
  cnt=0
  a.each do |aa|
    next if aa%num==0
    cnt+=1
    break if cnt>1
  end
  if cnt<=1
    ans=num
    break
  end
end
puts ans
//  [ruby]
_,a=$<.map{|m|m.split.map(&:to_i)}
mgcd = a[0]
mngcd = 1
a[1..-1].each.with_index(1) do |ai, i|
  gcd = mgcd.gcd(a[i])
  mngcd = mngcd.gcd(a[i])
  if gcd < mgcd && mngcd < mgcd
    mngcd = mgcd
  end
  mgcd = gcd
end

fgcd = 0
a[1..-1].each do |ai|
  fgcd = fgcd.gcd(ai)
end
p [mngcd, mgcd, fgcd].max
//  [ruby]
N=gets.to_i
list=gets.chomp.split(" ").map(&:to_i)
list.sort!
list.reverse!
index=0
val=list[0]
if list.length==2
  print(list.max)
else
  
for i in 1..N-1
  if(val>val.gcd(list[i]))
    index=i
    val=val.gcd(list[i])
  end
end
if index==1
  if list[1].gcd(list[0])<list[1].gcd(list[2])
    index=0
  end
end
class Array
  def gcd
    self.inject{|a,b| a.gcd(b)}
  end
end
list.slice!(index)
print (list.gcd)
  
end
//  [ruby]
n=gets.to_i
s=gets.split.map &:to_i
a=s.reverse
ans=[]
ans1=[]
ans2=[]
ans1[0]=s[0]
ans2[0]=a[0]
sum1=s[0]
sum2=a[0]
for i in 1..n-2
  ans1 << sum1.gcd(s[i])
  ans2 << sum2.gcd(a[i])
end
ans << ans2[n-2]
ans << ans1[n-2]
ans2.delete_at(n-2)
ans1.delete_at(n-2)
ans2.reverse
for i in 0..n-3
  ans << ans1[i].gcd(ans2[i])
end
puts ans.max
//  [ruby]
n=gets.to_i
s=gets.split.map &:to_i
a=s.reverse
ans=[]
ans1=[]
ans2=[]
ans1[0]=s[0]
ans2[0]=a[0]
sum1=s[0]
sum2=a[0]
for i in 1..n-2
  ans1 << sum1.gcd(s[i])
  ans2 << sum2.gcd(a[i])
end
ans << ans2[n-2]
ans << ans1[n-2]
for i in 0..n-2
  ans << ans1[i].gcd(ans2[n-2-i])
end
puts ans.max
//  [ruby]
n=gets.to_i
s=gets.split.map &:to_i
a=s.reverse
ans=[]
ans1=[]
ans2=[]
ans1[0]=s[0]
ans2[0]=a[0]
sum1=s[0]
sum2=a[0]
for i in 1..n-2
  ans1 << sum1.gcd(s[i])
  ans2 << sum2.gcd(a[i])
end
ans << ans2[n-2]
ans << ans1[n-2]
for i in 0..n-2
  ans << ans1[i].gcd(ans2[n-1-i])
end
puts ans.max
//  [rust]
use std::cmp::max;

fn read<T: std::str::FromStr>(
    stdin_lock: &mut std::io::StdinLock,
    buf: &mut Vec<u8>,
    delimiter: u8,
) -> T {
    buf.clear();
    let l = std::io::BufRead::read_until(stdin_lock, delimiter, buf).unwrap();
    buf.truncate(l - 1); // remove delimiter
    let s = unsafe { std::str::from_utf8_unchecked(&buf) };
    s.parse().unwrap_or_else(|_| panic!("read"))
}

fn gcd(a: i32, b: i32) -> i32 {
    fn gcd1(m: i32, n: i32) -> i32 {
        if n == 0 {
            m
        } else {
            gcd1(n, m % n)
        }
    }
    if a > b {
        gcd1(a, b)
    } else {
        gcd1(b, a)
    }
}

fn main() {
    let stdin = std::io::stdin();
    let mut stdin_lock = stdin.lock();
    let mut buf: Vec<u8> = Vec::new();
    let n: usize = read(&mut stdin_lock, &mut buf, b'\n');
    let mut av = vec![0i32; n];
    for i in 0..n - 1 {
        av[i] = read(&mut stdin_lock, &mut buf, b' ');
    }
    av[n - 1] = read(&mut stdin_lock, &mut buf, b'\n');

    let mut lv = vec![0i32; n];
    lv[0] = av[0];
    for i in 1..n {
        lv[i] = gcd(lv[i - 1], av[i]);
    }

    let mut rv = vec![0i32; n];
    rv[n - 1] = av[n - 1];
    for i in 1..n {
        let j = n - i - 1;
        rv[j] = gcd(rv[j + 1], av[j]);
    }

    let mut ans = max(lv[n - 2], rv[1]);
    for i in 1..n - 1 {
        ans = max(ans, gcd(lv[i - 1], rv[i + 1]));
    }
    println!("{}", ans);
}
//  [rust]
use std::cmp::max;
fn read<T: std::str::FromStr>(
    stdin_lock: &mut std::io::StdinLock,
    buf: &mut Vec<u8>,
    delimiter: u8,
) -> T {
    buf.clear();
    let l = std::io::BufRead::read_until(stdin_lock, delimiter, buf).unwrap();
    buf.truncate(l - 1); // remove delimiter
    let s = unsafe { std::str::from_utf8_unchecked(&buf) };
    s.parse().unwrap_or_else(|_| panic!("read"))
}

fn gcd(a: i32, b: i32) -> i32 {
    fn gcd1(m: i32, n: i32) -> i32 {
        if n == 0 {
            m
        } else {
            gcd1(n, m % n)
        }
    }
    if a > b {
        gcd1(a, b)
    } else {
        gcd1(b, a)
    }
}

fn main() {
    let stdin = std::io::stdin();
    let mut stdin_lock = stdin.lock();
    let mut buf: Vec<u8> = Vec::new();
    let n: usize = read(&mut stdin_lock, &mut buf, b'\n');
    let mut av = vec![0i32; n];
    for i in 0..n - 1 {
        av[i] = read(&mut stdin_lock, &mut buf, b' ');
    }
    av[n - 1] = read(&mut stdin_lock, &mut buf, b'\n');

    let mut lv = vec![0i32; n];
    lv[0] = av[0];
    for i in 1..n {
        lv[i] = gcd(lv[i - 1], av[i]);
    }
    let mut rv = vec![0i32; n];
    rv[n - 1] = av[n - 1];
    for i in 1..n {
        let j = n - i - 1;
        rv[j] = gcd(rv[j + 1], av[j]);
    }

    let mut ans = max(gcd(av[1], rv[1]), gcd(lv[n - 2], av[n - 2]));
    for i in 1..n - 1 {
        ans = max(ans, gcd(lv[i - 1], rv[i + 1]));
    }
    println!("{}", ans);
}
//  [rust]
use std::cmp;
use std::cmp::max;
use std::cmp::min;
use std::collections::HashMap;
use std::collections::HashSet;
use std::fmt;
use std::io::stdin;
use std::io::Error;
use std::io::ErrorKind;
use std::io::Read;

#[derive(Debug)]
struct Input {
    n: u32,
    a: HashMap<u32, u32>,
}

fn handle_input(input_str: String) -> Result<Input, Error> {
    let mut iter = input_str.split_whitespace();
    let n: u32 = iter.next().unwrap().parse().unwrap();
    let mut a = HashMap::new();
    for _ in 0..n {
        let v: u32 = iter.next().unwrap().parse().unwrap();
        let counter = a.entry(v).or_insert(0);
        *counter += 1;
    }
    let input = Input { n: n, a: a };
    Ok(input)
}

fn gcd(a: u32, b: u32) -> u32 {
    if a == 0 {
        return b;
    }
    gcd(b % a, a)
}

fn handle_output(input: Input) -> Result<String, Error> {
    let mut a = input.a.keys().clone();
    let first = *a.next().unwrap();
    let mut max_gcd = a.fold(first, |acc, &x| gcd(x, acc));
    for (&k, &v) in input.a.iter() {
        if v > 1 {
            continue;
        }
        let mut iter = input.a.keys().filter(|&&x| x != k);
        if let Some(&max) = iter.next() {
            let mut g = max;
            for &j in iter {
                g = gcd(j, g);
            }
            if g > max_gcd {
                max_gcd = g;
            }
        }
    }
    Ok(format!("{}", max_gcd))
}

fn main() {
    let mut input_str = String::new();
    let stdin = stdin();
    stdin.lock().read_to_string(&mut input_str).unwrap();
    let input = handle_input(input_str).unwrap();
    let output = handle_output(input).unwrap();
    println!("{}", output);
}
//  [rust]
use proconio::{fastout, input};

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

    let mut a: Vec<usize> = a;
    a.sort();

    let mut result = 1;
    let mut x = 1;

    let mut i = 1;
    while i <= a[1] {
        let c = a.iter().filter(|&x| x % i == 0).count();

        if c == n - 1 {
            result = i;
        } else if c == n && i != 1 {
            x *= i;
            a = a.iter().map(|x| x / i).collect();
        }

        i += 1;
    }

    if result == 1 {
        result = a[0];
    }

    println!("{}", result * x);
}
//  [rust]
use proconio::input;

fn gcm(a: usize, b: usize) -> usize {
  if b == 0 {
    a
  } else {
    gcm(b, a % b)
  }
}

fn main() {
  input! {
    n: usize,
    mut vals: [usize;n]
  }
  
  if vals.len() == 2 {
    println!(
      "{}",
      if vals[0] < vals[1] {
        vals[1]
      } else {
        vals[0]
      }
    );
    return
  }
  
  vals.sort();
  let mut memo: Vec<usize> = vec![0;n];
  memo[n-1] = vals[n-1];
  let mut index = vals.len() - 2;
  loop {
    memo[index] = gcm(vals[index], memo[index+1]);
    if index == 0 { break }
    index -= 1;
  }
  
  let mut max = 1;
  let mut m = vals[0];
  for i in 1..n-1 {
    max = std::cmp::max(max, gcm(m, memo[i+1]));
    m = gcm(m, vals[i]);
  }
  max = std::cmp::max(max, gcm(vals[1], memo[2]));
  
  println!("{}", max);
}
//  [rust]
use proconio::input;

fn gcm(a: usize, b: usize) -> usize {
  if b == 0 {
    a
  } else {
    gcm(b, a % b)
  }
}

fn main() {
  input! {
    n: usize,
    mut vals: [usize;n]
  }
  
  if vals.len() == 2 {
    println!(
      "{}",
      if vals[0] < vals[1] {
        vals[1]
      } else {
        vals[0]
      }
    );
    return
  }
  
  vals.sort();
  let mut memo: Vec<usize> = vec![0;n];
  memo[n-1] = vals[n-1];
  let mut index = vals.len() - 2;
  loop {
    memo[index] = gcm(vals[index], memo[index+1]);
    if index == 0 { break }
    index -= 1;
  }
  
  let mut max = 1;
  let mut m = vals[0];
  for i in 1..n-1 {
    max = std::cmp::max(max, gcm(m, memo[i+1]));
    m = gcm(m, vals[i]);
  }
  println!("{}", max);
}
//  [swift]
func gcd(x: Int, _ y: Int) -> Int {
    return y>0 ? gcd(y, x%y) : x
}
let N = Int(readLine()!)!
let A = readLine()!.characters.split(" ").map{Int(String($0))!}
var L = [0]
var R = [0]
for i in 0..<N {
    L += [gcd(L[i], A[i])]
    R += [gcd(R[i], A[N-i-1])]
}
var ans = 0
for i in 0..<N {
    ans = max(ans, gcd(L[i], R[N-i-1]))
}
print(ans)
//  [swift]
func gcd(x: Int, _ y: Int) -> Int {
    return y>0 ? gcd(y, x%y) : x
}
let N = Int(readLine()!)!
let A = readLine()!.characters.split(" ").map{Int(String($0))!}
var L = [0]
var R = [0]
for i in 0..<N {
    L += [gcd(L[i], A[i])]
    R += [gcd(R[i], A[N-i-1])]
}
print((0..<N).map{gcd(L[$0], R[N-$0-1])}.maxElement()!)
//  [swift]
func gcd(x: Int, _ y: Int) -> Int {
    return y>0 ? gcd(y, x%y) : x
}
let N = Int(readLine()!)!
let A = readLine()!.characters.split(" ").map{Int(String($0))!}
var L = [0]
var R = [0]
for i in 0..<N {
    L += [gcd(L[i], A[i])]
    R += [gcd(R[i], A[N-i-1])]
}
print((0..<N).map{gcd(L[i], R[N-i-1])}.maxElement()!)
//  [swift]
let N = Int(readLine()!)!
let A = readLine()!.characters.split(" ").map{Int(String($0))!}
var L = [0]
var R = [0]
for i in 0..<N {
    L += [gcd(L[i], A[i])]
    R += [gcd(R[i], A[N-i-1])]
}
var ans = 0
for i in 0..<N {
    ans = max(ans, gcd(L[i], R[N-i-1]))
}
print(ans)
//  [typescript]
function main(input) {
  input = input.trim().split("\n");
  const n = Number(input[0]);
  const a = input[1].split(" ").map(n => Number(n));
  const gcd = (a, b) => {
    if (b === 0) return a;
    return gcd(b, a%b);
  }
  const l = [];
  for (let i = 0; i < n; i++) {
    if (i === 0) {
      l.push(a[i]);
      continue;
    }
    l.push(gcd(l[l.length-1], a[i]));
  }
  
  const r = [];
  for (let i = n - 1; 0 <= i; i--) {
    if (i === n-1) {
      r.push(a[i]);
      continue;
    }
    r.push(gcd(r[r.length-1], a[i]));
  }
  
  let result = 0;
  for (let i = 0; i < n; i++) {
    const num = gcd(i === 0 ? 0 : l[i-1], i === n-1 ? 0 : r[n-i-2]);
    if (result < num) result = num;
  }
  console.log(result);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
{
  const main = (input: string): void | string | number => {
    const re = reader(input)
    const N = re.n()
    const a = re.ns()

    // gcd of 0~i
    const l: number[] = []
    const r: number[] = []

    l[0] = a[0]
    r[N - 1] = a[N - 1]

    for (let i = 1; i < N; i++) {
      l[i] = _gcd(l[i - 1], a[i])
    }
    for (let i = N - 2; i >= 0; i--) {
      r[i] = _gcd(r[i + 1], a[i])
    }

    // console.log(l)
    // console.log(r)

    let ans = 0

    for (let i = -2; i < N; i++) {
      // console.log(l[i] || r[i + 2], r[i + 2] || l[i])
      ans = Math.max(ans, _gcd(l[i] || r[i + 2], r[i + 2] || l[i]))
    }
    // Object.keys(lib).map(k => {
    //   const v = lib[k]

    //   if (v >= N - 1) {
    //     ans = Math.max(ans, Number(k))
    //   }
    // })
    return ans
  }

  const reader = (str: string) => {
    const lines = str.trim().split('\n')
    const s = () => lines.shift() || ''
    const n = () => Number(s())

    const ss = () => s().split(' ')
    const ns = () => ss().map(Number)
    const nls = () => lines.map(Number)

    return { lines, s, n, ss, ns, nls }
  }

  const _gcd = (a, b) => (b ? _gcd(b, a % b) : a)

  const getInput = () => require('fs').readFileSync('/dev/stdin', 'utf8')
  const res = main(getInput())

  if (typeof res === 'number' || typeof res == 'string') console.log(res)
}
//  [typescript]
import * as fs from 'fs';

function Picker(input) {
  var lines = input.split('\n');
  var fields = lines.reduce(function(all, line) { return all.concat(line.split(' ')); }, []);
  var p = 0;

  return {
    int: function() {
      return parseInt(fields[p++], 10);
    },
    float: function() {
      return parseFloat(fields[p++]);
    },
    str: function() {
      return fields[p++];
    }
  };
}

const input = fs.readFileSync("/dev/stdin", "utf8");
const pick = Picker(input);

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

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

const n = pick.int();
const a = new Array(n).fill(0).map(() => pick.int());

const l = [0];
for (let i = 0; i < n; ++i) {
  l.push(gcd(l[i], a[i]));
}
const r = [0];
for (let i = 0; i < n; ++i) {
  r.push(gcd(r[i], a[n - i - 1]));
}

let max = 0;
for (let i = 0; i < n; ++i) {
  const v = gcd(l[i], r[n - i - 1]);
  if (v > max) max = v;
}

console.log(max);
//  [typescript]
{
  const main = (input: string): void | string | number => {
    const r = reader(input)
    const N = r.n()
    const A = r.ns()

    // const lib: number[] = []
    const lib: Record<number, number> = {}

    A.forEach(a => {
      const { list } = _divisors(a)

      list.forEach(div => {
        lib[div] = (lib[div] || 0) + 1
      })
    })

    // console.log(lib)

    let ans = 0

    Object.keys(lib).map(k => {
      const v = lib[k]

      if (v >= N - 1) {
        ans = Math.max(ans, Number(k))
      }
    })
    return ans
  }

  const reader = (str: string) => {
    const lines = str.trim().split('\n')
    const s = () => lines.shift() || ''
    const n = () => Number(s())

    const ss = () => s().split(' ')
    const ns = () => ss().map(Number)
    const nls = () => lines.map(Number)

    return { lines, s, n, ss, ns, nls }
  }
  const _divisors = (n: number) => {
    const sq = Math.floor(Math.sqrt(n))
    const list: number[] = []
    const pairs: [number, number][] = []

    for (let i = sq; i > 0; i--) {
      if (n % i !== 0) {
        continue
      }
      list.unshift(i)
      if (sq * sq !== n) {
        list.push(n / i)
      }
      pairs.unshift([i, n / i])
    }
    return { list, pairs }
  }

  const getInput = () => require('fs').readFileSync('/dev/stdin', 'utf8')
  const res = main(getInput())

  if (typeof res === 'number' || typeof res == 'string') console.log(res)
}
//  [typescript]
const input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);let input_i=-1;const tn=():number=>{input_i++;return Number(input[input_i])};const tnn=(n:number):number[]=>{const a=[];for(let i=0;i<n;i++){a.push(tn())}return a};const ts=():string=>{input_i++;return String(input[input_i])};const tss=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(ts())}return a};const to=(...arg)=>{console.log(...arg)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const floor=(a)=>{return Math.floor(a)};const asc=(ar:number[])=>{const t=[...ar];return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{const t=[...ar];return t.sort((a,b)=>{return b-a})};const sw=(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length-1;i+=2){if(eval(a+op+arr[i])){return arr[i+1]}}return arr[arr.length-1]};const near=(n:number,arr:number[]):number=>{let ne=arr[0],ni=0;for(let i=1;i<arr.length;i++){if(Math.abs(n-ne)>Math.abs(n-arr[i])){ne=arr[i];ni=i}}return ni};const deduplicate=(a:any[]):any[]=>{return Array.from(new Set(a))};const gcd=(x,y)=>{while(y){[x,y]=[y,x%y]}return x};
const main=()=>{
  let n=tn(),ns=tnn(n)
  if(n==2){
    to(gcd(ns[0],ns[1]))
    return
  }
  if(n==3){
    to(max(gcd(ns[0],ns[1]),gcd(ns[1],ns[2]),gcd(ns[0],ns[2])))
    return
  }
  let calc=max(gcd(ns[0],ns[1]),gcd(ns[2],ns[3])),saveIndex
  for(let i=0;i<n;i++){
    if(calc>gcd(calc,ns[i])){
      calc=gcd(calc,ns[i])
      saveIndex = i
    }
  }
  calc=max(gcd(ns[0],ns[1]),gcd(ns[2],ns[3])),saveIndex
  for(let i=0;i<n;i++){
    if(saveIndex==i)continue
    calc=gcd(calc,ns[i])
  }
  to(calc)
}
main()
//  [typescript]
const input=require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/);let input_i=-1;const tn=():number=>{input_i++;return Number(input[input_i])};const tnn=(n:number):number[]=>{const a=[];for(let i=0;i<n;i++){a.push(tn())}return a};const ts=():string=>{input_i++;return String(input[input_i])};const tss=(n:number):string[]=>{const a=[];for(let i=0;i<n;i++){a.push(ts())}return a};const to=(...arg)=>{console.log(...arg)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const floor=(a)=>{return Math.floor(a)};const asc=(ar:number[])=>{const t=[...ar];return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{const t=[...ar];return t.sort((a,b)=>{return b-a})};const sw=(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length-1;i+=2){if(eval(a+op+arr[i])){return arr[i+1]}}return arr[arr.length-1]};const near=(n:number,arr:number[]):number=>{let ne=arr[0],ni=0;for(let i=1;i<arr.length;i++){if(Math.abs(n-ne)>Math.abs(n-arr[i])){ne=arr[i];ni=i}}return ni};const deduplicate=(a:any[]):any[]=>{return Array.from(new Set(a))};const rep=(n,c:(i?:number)=>void)=>{for(let i=0;i<n;i++)c(i)};const gcd=(x,y)=>{while(y){[x,y]=[y,x%y]}return x};
const main=()=>{
  let n=tn(),ns=tnn(n)
  if(n==2){
    to(gcd(ns[0],ns[1]))
    return
  }
  let calc=max(gcd(ns[0],ns[1]),gcd(ns[1],ns[2]),gcd(ns[0],ns[2])),saveIndex
  for(let i=0;i<n;i++){
    if(calc>gcd(calc,ns[i])){
      calc=gcd(calc,ns[i])
      saveIndex = i
    }
  }
  calc=max(gcd(ns[0],ns[1]),gcd(ns[1],ns[2]),gcd(ns[0],ns[2]))
  for(let i=0;i<n;i++){
    if(saveIndex==i)continue
    calc=gcd(calc,ns[i])
  }
  to(calc)
}
main()
//  [python]
input_str = input().split(" ")
input_int = list(map(int, input_str))
A = input_int[0]
B = input_int[1]
T = input_int[2]

bis_sum = 0
start = 0
end = A
while True:
    if start < T+0.5 and end > T+0.5:
        break
    start += A
    end += A
    bis_sum += B

print(bis_sum)
//  [python]
lst = input().split()
A = int(lst[0])
B = int(lst[1])
T = int(lst[2])

print((T//A)*B)
//  [python]
a,b,t=map(int,input().split())
print(t//a*b)
//  [python]
N = int(input())
A = list(map(int, input().split()))

souwa = 0
cnt = 0
keep = 1e10

for i in range(N):
    if A[i] < 0:
        cnt += 1
        A[i] *= (-1)

    souwa += A[i]
    keep = min(keep, A[i])

print(souwa - 2 * keep * (cnt % 2))
//  [python]
a, b, t = map(int, input().split())
print(t//a*b)
debug_pri
//  [python]
A, B, T = map(int, input().split())

print((T+0.5)//A*B)
//  [java]
import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;

public class Main {

	public static void main(String[] args) {
		FastScanner sc = new FastScanner();
		int A = sc.nextInt();
		int B = sc.nextInt();
		int T = sc.nextInt();
		System.out.println(B * (T / A));
	}
}

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;
import java.util.Arrays;
import java.util.List;

class Main {

    public static void main(String[] args) throws Exception {

        try {

            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

            List<String> input = Arrays.asList(br.readLine().split(" "));

            int A = Integer.parseInt(input.get(0));
            int B = Integer.parseInt(input.get(1));
            int T = Integer.parseInt(input.get(2));

            int result = 0;
            while (T >= A) {
                result += B;
                T -= A;
            }

            System.out.println(result);
        } catch (IOException | NumberFormatException e) {
            e.printStackTrace();
            System.exit(0);
        } catch (final Exception e) {
            e.printStackTrace();
            System.exit(0);
        }
    }
}
//  [java]

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

public class Main {

	public static void main(String[] args) throws IOException {
		new Main().solve();
	}

	private void solve() throws IOException {
		try {
			solveA();
			//			 solveB();
			//			 solveC();
			//			 solveD();
			//			 solveE();
			//			 solveF();
		} finally {
			if (in != null) {
				in.close();
			}
			if (out != null) {
				out.flush();
				out.close();
			}
		}

	}

	private void solveA() {
		int a = nextInt();
		int b = nextInt();
		int t = nextInt();

		int res = 0;

		double time = 0;
		while (time <= t + 0.5) {
			time += a;
			if (time <= t + 0.5) {
				res += b;
			}
		}

		out.println(res);
	}

	private void solveB() {
		int numN = nextInt();

		out.println("");
	}

	private void solveC() {
		int numN = nextInt();

		out.println("");
	}

	private void solveD() {
		int numN = nextInt();

		out.println("");
	}

	private void solveE() {
		int numN = nextInt();

		out.println("");
	}

	private void solveF() {
		int numN = nextInt();

		out.println("");
	}

	private final PrintWriter out = new PrintWriter(System.out);
	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;
	}

	private void skipUnprintable() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr]))
			ptr++;
	}

	public boolean hasNext() {
		skipUnprintable();
		return hasNextByte();
	}

	public int nextInt() {
		return Integer.parseInt(next());
	}

	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();
		}
	}
}
//  [java]
package com.example.demo.service;

import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt(), b = sc.nextInt(), t = sc.nextInt(), ans = 0;
        for(int i=1;i<t+1;i++)if(i%a==0)ans+=b;
        System.out.println(ans);
    }
}
//  [java]
import java.util.*;

/**
 * Main
 */
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int A = sc.nextInt();
		int B = sc.nextInt();
		int T = sc.nextInt();
		int Bis = 0;
		int Time = 0;
		while (Time < T + 0.5) {
			Bis += B;
			Time += A;
		}

		System.out.println(Bis);

		sc.close();
	}
};
//  [java]
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		Double A = sc.nextDouble();
		Double B = sc.nextDouble();
		Double T = sc.nextDouble();
		sc.close();
		int a = (int)((T+0.5)/A);
		System.out.println(a*B);
	}

}
//  [cpp]
#include <iostream>
using namespace std;


int main() {
	int a, b, t;
	cin >> a >> b >> t;

	cout << (t / a) * b << endl;

	//system("pause");
	return 0;
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define all(v) v.begin(), v.end()
#define mod 1000000007
//'A' = 65, 'Z' = 90, 'a' = 97, 'z' = 122

int main() {
    int a, b, t;
    cin >> a >> b >> t;
    cout << b  * (t / a) << endl;

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

using namespace std;

int main(void){
    int A, B, T;
    cin >> A >> B >> T;
    cout << (T / A) * B << endl;


    return 0;
}
//  [cpp]
#pragma GCC optimize("O3")

#define _GLIBCXX_DEBUG
#include <iostream>
#include <vector>
#include <string>
#include <string_view>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <cassert>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
using namespace std;

/*----------macros----------*/

//input, output================
#define fastio                          \
std::ios::sync_with_stdio(false);       \
std::cin.tie(nullptr);                  \
std::cout.tie(nullptr)

#define endl '\n'
#define fcout(a)                        \
cout << fixed << setprecision((int)(a))

//typedef===============
typedef long long       ll;
typedef long double     ld;
typedef vector<int>     Vi;
typedef vector<ll>      Vl;
typedef pair<int, int>  Pii;
typedef pair<ll, ll>    Pll;

//const number==========
constexpr ll INF    = (ll)1e9 + 1;
constexpr ll INFll  = (ll)1e18 + 1;
constexpr ll MOD1   = 1000000007;
constexpr ll MOD2   = 998244353;
constexpr ld PI     = 3.141592653589793L;

//member================
#define psb push_back
#define epb emplace_back
#define psf push_front
#define mkp make_pair
#define fst first
#define snd second

//others================
#define sz(x)                           \
(int) x.size()

#define all(x)                          \
(x).begin(), (x).end()

#define rall(x)                         \
(x).rbegin(), (x).rend()

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

#define reps(i, n)                      \
for(int i = 1; (i) <= (n); ++(i))

#define rrep(i, n)                      \
for(int i = n - 1; (i) >= 0 ; --(i))

#define repbit(bit, n)                  \
for(int bit = 0; (bit) < (1 << (n)); ++(bit))

#define ifbit(bit, i)                   \
if((bit) & (1 << (i)))

#define CtoI(c)                         \
int((c)) - int('0')

#define ItoC(c)                         \
char((c) + '0')

//functions=============
template<typename T1, typename T2>
inline bool chmax(T1 &a, T2 b)
{ return a < b && (a = b, true); }

template<typename T1, typename T2>
inline bool chmin(T1 &a, T2 b)
{ return a > b && (a = b, true); }

// Vi  dx = {1, 0, -1, 0},
//     dy = {0, 1, 0, -1};

// Vi  dx2 = { 1,1,0,-1,-1,-1,0,1 },
//     dy2 = { 0,1,1,1,0,-1,-1,-1 };

/*--------additional--------*/



/*----------main------------*/

int main() {
fastio;

    int a, b, t; cin >> a >> b >> t;

    int i = 1;
    int cnt = 0;
    while(t > 0){
        ++cnt;
        t -= a * i;
        ++i;
    }

    cout << b * cnt << endl;

return 0;
}
//  [cpp]
#include<iostream>
#include<string>
#include<vector>
#include<cmath>
#include<queue>
#include<stack>
#include<set>
#include<algorithm>
#include<utility>
#include<map>
using namespace std;
typedef long long ll;
const int mod = 1000000007;
const int INF = 1001001001;

ll pow_mod(ll p, ll n, ll m) {
	if (n == 0) return 1;
	else if (n == 1) return p % m;
	else if (n % 2 == 1) return p * pow_mod(p, n - 1, m) % m;
	else {
		ll tmp = pow_mod(p, n / 2, m);
		return (tmp * tmp) % m;
	}
}

ll gcd(ll x, ll y) {
	if (y == 0) {
		return x;
	}
	return gcd(y, x % y);
}

ll com_mod(ll n, ll k, ll m) {
	if (k == 0) return 1;
	else {
		ll x = 1;
		ll y = 1;
		for (ll i = 0; i < k; i++) {
			x = (x * (n - i)) % m;
			y = (y * (i + 1)) % m;
		}
		ll res = (x * pow_mod(y, m - 2, m)) % m;
		return res;
	}
}

int main() {
	int a, b, t; cin >> a >> b >> t;
	cout << (t + 0.5) / a * b << endl;
	return 0;
}
//  [cpp]
#include <iostream>
using namespace std;

int main() {
  int N, X_Y;
  cin >> N;
  
  int V[N], C[N];
  for(int i=0; i<N; i++) {
    cin >> V[i];
  }
  
  for(int i=0; i<N; i++) {
    cin >> C[i];
  }
  
  X_Y = 0;
  for(int i=0; i<N; i++) {
    if(V[i] > C[i]) {
      X_Y = X_Y + (V[i] - C[i]);
    }
  }
  
  cout << X_Y << endl;
  return 0;
}
//  [c]
#include <stdio.h>
#include <sysexits.h>
#include <math.h>
int main(void){
  int a,b,T,sum;
  if(scanf("%d %d %d",&a,&b,&T)!=3){
exit(1);
}

  sum = (T/a)*b;
  printf("%d",sum);
  return 0;
}
//  [c]
#include<stdio.h>

int main()
{
	int A,B,T;

	scanf("%d%d%d",&A,&B,&T);
	int number;

	number=B*(T/A);
	printf("%d",number);


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

int main(){
	int a,b,t,A;
	scanf("%d %d %d",&a,&b,&t);
	A=(int)(t/a)*b;
	printf("%d\n",A);
	return 0;
}
//  [c]
#include<stdio.h>

int main(void){
  int a,b,t;
  scanf("%d %d %d",&a,&b,&t);
  int s=1,k=0;
  
  for(int i=0;(double)i<(double)t+0.5;i++){
    if(i=s*a){
      s++;
      k+=b;
    }
  }
  printf("%d\n",k);
return 0;
}
//  [c]
#include<stdio.h>

int main(void){
  int a,b,t;
  scanf("%d %d %d",&a,&b,&t);
  int s=1,k=0;
  
  for(int i=0;i<t+0.5;i++){
    if(i=s*a){
      s++;
      k+=b;
    }
  }
  printf("%d",k);
return 0;
}
//  [c]
#include <stdio.h>
int main(void)
{
    int A,B,T;
    scanf("%d %d",&A,&B,&T);
    printf("%d",(T/A)*B);
}