akhauriyash/Code-Regression huggingface dataset:
import java.util.Scanner;

public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        String C = sc.next();

        int R = 0;
        int W = 0;
        String[] colors = new String[C.length()];
        for(int i = 0 ; i < C.length() ; i++){
            colors[i] = String.valueOf(C.charAt(i));
            if(colors[i].equals("R")){
                R++;
            }
            else{
                W++;
            }
        }
        sc.close();
        
        int p = 0;
        for(int i = 0 ; i < R ; i++){
            if(colors[i].equals("W"))
            p++;
        }

        System.out.println(p);

    }
}

Measured memory_bytes: 41548
#include<bits/stdc++.h>

using namespace std;


int main(){
    long long A,B,K;
    long long ans=0;
    string S;
    double Q;

    long tmp;

    cin>>A>>B>>K;


    vector<int> vec;


    for(int i=1;i<=max(A,B);++i){
        if(A%i==0&&B%i==0){
            vec.push_back(i);
        }
    }



    ans=vec[vec.size()-K];

   cout<<ans<<endl;


}

Measured memory_bytes: 256
#include<stdio.h>
typedef long long ll;
int main(){
	ll a,b,c,d;
	while(~scanf("%lld%lld%lld%lld",&a,&b,&c,&d)){
		if(a*b>=c*d){
			printf("%lld\n",a*b);
		}
		else
			printf("%lld\n",c*d);
	}
 return 0;
}

Measured memory_bytes: 128
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
#include <bitset>
#define chmin(a, b) ((a) = min((a), (b)))
#define chmax(a, b) ((a) = max((a), (b)))
#define fs first
#define sc second
#define eb emplace_back
using namespace std;

typedef long long ll;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;

const ll MOD = 1e9 + 7;
const ll INF = 1e18;
const double pi = acos(-1);
const double eps = 1e-10;

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

int main(){
    int h1, h2; cin>>h1>>h2;
    int k1, k2; cin>>k1>>k2;
    int a, b, c, d; cin>>a>>b>>c>>d;

    int hsum = h1 * a + h2 * b + (h1 / 10) * c + (h2 / 20) * d;
    int ksum = k1 * a + k2 * b + (k1 / 10) * c + (k2 / 20) * d;

    if(hsum < ksum){
        cout << "kenjiro" << endl;
    }
    else if(hsum > ksum){
        cout << "hiroshi" << endl;
    }
    else{
        cout << "even" << endl;
    }
}


Measured memory_bytes: 3092
#include <stdio.h>

int main(void)
{
    int s;
    int m = 0;
    int h = 0;
    
    scanf("%d", &s);
    
    if(s>=60){
        m = s/60;
        s -= m*60;
    }
    if(m>=60){
        h = m/60;
        m -= h*60;
    }
    
    printf("%d:%d:%d\n", h, m, s);
    
    return 0;
}

Measured memory_bytes: 592
package main

import (
	"fmt"
)

func main() {

	var N int
	fmt.Scanf("%d", &N)

	var max int = 0
	var count int
	var H, Hbefore int
	for i := 0; i < N; i++ {
		fmt.Scanf("%d", &H)
		if Hbefore >= H {
			count++
		} else {
			if max <= count {
				max = count
			}
			count = 0
		}

		Hbefore = H
	}

	if count > 0 {
		if max <= count {
			max = count
		}
	}

	fmt.Println(max)
}


Measured memory_bytes: 6332
#include<iostream>
using namespace std;
int main(){
    int n, i, p;
    while(cin >> n,n){
        int min = 1000;
        int max = 0;
		int total = 0;
		for(int i=0;i<n;i++){
			cin >> p;
			if(p > max) max = p;
			if(p < min) min = p;
			total += p;
        }
        cout << (total-max-min)/(n-2) << "\n";
    }
}

Measured memory_bytes: 1160
// clang-format off
#include <bits/stdc++.h>

#define mp make_pair
#define fst first
#define snd second
#define forn(i,n) for (int i = 0; i < int(n); i++)
#define forn1(i,n) for (int i = 1; i <= int(n); i++)
#define popcnt __builtin_popcount
#define ffs __builtin_ffs
#define ctz __builtin_ctz
#define clz __builtin_clz
#define all(a) (a).begin(), (a).end()
 
using namespace std;

using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int,int>;
using pli = pair<ll,int>;
using pil = pair<int,ll>;
using pll = pair<ll,ll>;
template <typename T> using vec = vector<T>;
using vi = vec<int>;
using vl = vec<ll>;
template <typename T> using que = queue<T>;
template <typename T> using deq = deque<T>;

template <typename T> T id(T b) {return b;};
template <typename T> void chmax(T &x, T y) {if (x < y) x = y;}
template <typename T> void chmin(T &x, T y) {if (x > y) x = y;}
template <typename S, typename K> bool contains(S &s, K k) { return s.find(k) != s.end(); }
void fastio() { ios_base::sync_with_stdio(false); cin.tie(nullptr); }
constexpr ll TEN(int n) { if (n == 0) return 1LL; else return 10LL*TEN(n-1); }
// clang-format on

const int MAX_N = 200000;
ll n, k;
int a[MAX_N];
bool vis[MAX_N];

int main() {
    fastio();

    cin >> n >> k;
    forn(i, n) {
        cin >> a[i];
        a[i]--;
    }

    vis[0] = true;
    int cur = 0;
    while (true) {
        k--;
        cur = a[cur];

        if (k == 0) {
            cout << (cur + 1) << endl;
            return 0;
        }

        if (vis[cur]) {
            int temp = a[cur];
            ll d = 1;
            while (cur != temp) {
                temp = a[temp];
                d++;
            }

            k = k % d;

            temp = cur;
            forn(i, k) {
                temp = a[temp];
            }

            cout << (temp + 1) << endl;

            return 0;
        }

        vis[cur] = true;
    }

    return 0;
}

Measured memory_bytes: 4628
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <string>
#include <vector>

using namespace std;
using LLONG = long long;

int main()
{
    int A, B, C, D;
    cin >> A >> B >> C >> D;
    if (A + B > C + D)
    {
        cout << "Left" << endl;
    }
    else if (A + B < C + D)
    {
        cout << "Right" << endl;
    }
    else
    {
        cout << "Balanced" << endl;
    }
    return 0;
}

Measured memory_bytes: 256
#include <iostream>
#include <stdio.h>
#include <vector>
using namespace std;

int n;
char grid[211][211];
vector<int> Graph[211];

int q[100111];
int qL = 0;
int uk;
bool TFO[100111];
int dist[100111];

int BFS(int ver)
{
    int i,j;

    for (i=1;i<=n;i++)
    {
        TFO[i] = false;
        dist[i] = -1;
    }

    uk = 1;
    qL = 1;
    q[1] = ver;
    dist[ver] = 1;
    TFO[ver] = true;

    int ans = 0;

    while(uk <= qL)
    {
        int v = q[uk];

        for (i=0;i<Graph[v].size();i++)
        {
            if (TFO[ Graph[v][i] ])
            {
                if (dist[ Graph[v][i] ] == dist[v])
                    return -1;
                continue;
            }

            qL++;
            q[qL] = Graph[v][i];
            dist[ Graph[v][i] ] = dist[v] + 1;
            TFO[ Graph[v][i] ] = true;
        }

        uk++;
    }

    return dist[ q[qL] ];
}

int main()
{
    int i,j;

    scanf("%d",&n);

    for (i=1;i<=n;i++)
    {
        scanf("%s",grid[i]+1);

        for (j=1;j<=n;j++)
        {
            if (grid[i][j] == '1')
                Graph[i].push_back(j);
        }
    }

    int best = -1;
    for (i=1;i<=n;i++)
    {
        int v = BFS(i);
        if (v > best)
            best = v;
    }

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

    return 0;
}


Measured memory_bytes: 512
#define _USE_MATH_DEFINES

#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cmath>
#include <bitset>
using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef tuple<ll, ll, ll> tl3;



const int BIG_NUM = 1e9;
const ll INF = 1000000000000000000;
const ll MOD = 1e9 + 7;
//const ll MOD = 998244353;


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

	vector<ll> h(n);
	ll sa = 0;
	for (int i = 0; i < n; i++) {
		ll a, b;
		cin >> a >> b;
		h[i] = a + b;
		sa += a;
	}

	ll ans = sa;
	sort(h.begin(), h.end(), greater<ll>());
	for (int i = 1; i < n; i += 2) {
		ans -= h[i];
	}

	cout << ans << endl;
}

Measured memory_bytes: 4008
#include <bits/stdc++.h>
using namespace std;
#include <math.h>
#include <iomanip>
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

const int mod=1000000007;

vector<pair<int64_t,int64_t>>prime_factorize(int64_t x){
  vector<pair<int64_t,int64_t>>p;
  for(int64_t i=2;i*i<=x;i++){
    int cnt=0;
    if(x%i==0){
    while(x%i==0){cnt++;x/=i;}
    p.push_back(make_pair(i,cnt));
    }
  }
  if(x!=1){p.push_back(make_pair(x,1));}
  return p; 
}
int main() {
  string s;
  cin>>s;
  int n=s.size();
  vector<int>bc(n);
  int cntbc=0;
  for(int i=n-1;i>=0;i--){
    if(s[i]=='A'){bc[i]=cntbc;}
    else if(i-1>=0&&s.substr(i-1,2)=="BC"){cntbc++;bc[i-1]=cntbc;i--;}
    else if(i-1>=0&&s.substr(i-1,2)!="BC"){cntbc=0;}
  }
  
  int64_t ans=0;
  for(int i=n-1;i>=0;i--){
    if(i+1<=n-1&&s[i]=='A'){ans+=bc[i+1];}
  }
  cout<<ans<<endl;
  return 0;
}

Measured memory_bytes: 4456
#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using Pi = pair<int, int>;
using Pl = pair<ll, ll>;
using vint = vector<int>;
template<typename T> using uset = unordered_set<T>;
template<typename T1, typename T2> using umap = unordered_map<T1, T2>;

constexpr int INF = (1 << 30) - 1;
constexpr ll LLINF = 1LL << 60;
constexpr int dy[] = {1, 0, -1, 0, 1, -1, -1, 1};
constexpr int dx[] = {0, 1, 0, -1, 1, 1, -1, -1};
constexpr char el = '\n';
constexpr int mod = 1000000007;

template<typename T> T gcd(T a, T b) { return (b ? gcd(b, a % b) : a); }
template<typename T> T lcm(T a, T b) { return (a / gcd(a, b) * b); }
template<typename T1, typename T2> inline void chmin(T1 &a, T2 b) { if (a > b) a = b; }
template<typename T1, typename T2> inline void chmax(T1 &a, T2 b) { if (a < b) a = b; }

int main() {
    int N;
    int A[100005];
    int cnt = 0;
    cin >> N;
    for (int i = 0; i < N; i++) {
        cin >> A[i];
        if (i > 0 && A[i] - A[i - 1] <= 0) cnt++;
    }
    cout << cnt + 1 << endl;
    cout << N << endl;
    return (0);
}


Measured memory_bytes: 3484
import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Arrays;

public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int a = sc.nextInt();
    int b = sc.nextInt();
    int c = sc.nextInt();
    if(a*b*c==175){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }
  }
}


Measured memory_bytes: 21588
#include <iostream>
#include <vector>
#include <numeric>

using namespace std; 

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


int main() {
    
  int i, N, W[110];
  int S1 = 0, S2 = 0;
  int ans, min;

  cin >> N;
  REP(i, N){
	  cin >> W[i];
  }

  S1 = W[0];
  for(i = 1; i < N; i++){
	  S2 += W[i];
  }
  ans = abs(S1-S2);
  min = ans;

  for(i = 1; i < N; i++){
	  S1 += W[i];
	  S2 -= W[i];
	  ans = abs(S1-S2);
	  if( min >= ans ){
		  min = ans;
	  }
  }

  cout << min << endl;

  return 0;
}

/*
                   _ooOoo_
                  o8888888o
                  88" . "88
                  (| -_- |)
                  O\  =  /O
               ____/`---'\____
             .'  \\|     |//  `.
            /  \\|||  :  |||//  \
           /  _||||| -:- |||||-  \
           |   | \\\  -  /// |   |
           | \_|  ''\---/''  |   |
           \  .-\__  `-`  ___/-. /
         ___`. .'  /--.--\  `. . __
      ."" '<  `.___\_<|>_/___.'  >'"".
     | | :  `- \`.;`\ _ /`;.`/ - ` : | |
     \  \ `-.   \_ __\ /__ _/   .-` /  /
======`-.____`-.___\_____/___.-`____.-'======
                   `=---='
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
         pass System Test!
*/

Measured memory_bytes: 256
#include <algorithm>
#include <cmath>
#include <deque>
#include <iostream>
#include <limits>
#include <string>
#include <tuple>
#include <utility>
#include <vector>

using namespace std;
using i64 = std::int64_t;
#define rep(i, s, n) for (i64 i = (s); i < (n); ++i)

const vector<i64> kDi{-1, 1, 0, 0};
const vector<i64> kDj{0, 0, -1, 1};

int main() {
  i64 h, w, ch, cw, dh, dw;
  cin >> h >> w;
  cin >> ch >> cw;
  cin >> dh >> dw;
  --ch;
  --cw;
  --dh;
  --dw;
  vector<string> s(h);
  rep(i, 0, h) { cin >> s[i]; }
  // count, i, j
  deque<tuple<i64, i64, i64>> q{};
  q.push_back(make_tuple(0, ch, cw));
  while (!q.empty()) {
    const auto [count, i, j] = q.front();
    q.pop_front();
    if (i == dh && j == dw) {
      cout << count << endl;
      return 0;
    }
    if (s[i][j] != '.') {
      continue;  // Already traversed.
    }
    s[i][j] = 'X';  // Block.
    rep(d, 0, 4) {
      const auto ii = i + kDi[d];
      const auto jj = j + kDj[d];
      if (0 <= ii && ii < h && 0 <= jj && jj < w && s[ii][jj] == '.') {
        q.push_front(make_tuple(count, ii, jj));
      }
    }
    rep(di, -2, 3) {
      rep(dj, -2, 3) {
        const auto ii = i + di;
        const auto jj = j + dj;
        if (0 <= ii && ii < h && 0 <= jj && jj < w && s[ii][jj] == '.') {
          q.push_back(make_tuple(count + 1, ii, jj));
        }
      }
    }
  }
  cout << -1 << endl;

  return 0;
}


Measured memory_bytes: 6076
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl
typedef long long ll;
typedef unsigned long long ull;

int main()
{
    int n;
    while (cin >> n)
    {
        if (n == -1)
            break;
        double x = 1, y = 0;
        rep(i, n - 1)
        {
            double dis = sqrt(x * x + y * y);
            double a = -x / dis, b = -y / dis;
            double th = M_PI / 2;
            x = cos(-th) * a - sin(-th) * b + x;
            y = sin(-th) * a + cos(-th) * b + y;
        }

        printf("%.5f\n%.5f\n", x, y);
    }
    return 0;
}


Measured memory_bytes: 3112
#include<bits/stdc++.h>
using namespace std;
#define int long long
const int maxn=200020;
char qwq[maxn];
int n,dp[2],tot[30];
signed main(){
	dp[0]=1;
	cin>>qwq;
	++tot[qwq[0]-'a'+1];
	n=strlen(qwq);
	for (int i=1;i<n;++i) {
		dp[i&1]=dp[!(i&1)]+i-tot[qwq[i]-'a'+1];
		++tot[qwq[i]-'a'+1];
	}
	printf("%lld\n",dp[(n-1)&1]);
	return 0;
}

Measured memory_bytes: 384
#include <bits/stdc++.h>
using namespace std;

int main(){
    int n,l,r,sum=0;
    cin>>n;
    for(int i=0;i<n;i++){
        cin>>l>>r;
        sum=sum+(r-l+1);
    }
    cout<<sum<<endl;
    return 0;
}

Measured memory_bytes: 256
#define _DEBUG 1
#define _GLIBCXX_DEBUG

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

using ll = long long;

#ifdef _DEBUG
#define dump(x) cerr << #x << "=" << x << endl
#define dump2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
#define dump3(x, y, z)                                                     \
  cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z \
       << endl
#define check(s) cerr << s << endl
#else
#define dump(x)
#define dump2(x, y)
#define dump3(x, y, z)
#define check(s)
#endif

#define rep(i, n) for (int i = 0; i < n; i++)
#define repr(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define unique(v) v.erase(unique(v.begin(), v.end()), v.end());

const ll LINF = 2e18;
const int INF = 1e9;

void solve(ll X) {
  vector<bool> dp(100001, false);  // i円の買い物ができるならYes
  dp.at(0) = true;
  FOR(i, 1, 100) { dp.at(i) = false; }
  FOR(i, 100, 106) { dp.at(i) = true; }
  int idx = 106;
  while (idx <= X) {
    if (dp.at(idx - 100) || dp.at(idx - 101) || dp.at(idx - 102) ||
        dp.at(idx - 103) || dp.at(idx - 104) || dp.at(idx - 105)) {
      dp.at(idx) = true;
    }
    idx++;
  }

  int result = dp.at(X) ? 1 : 0;
  cout << result << endl;
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(15);

  ll X;
  cin >> X;
  solve(X);

  return 0;
}


Measured memory_bytes: 256
# define _CRT_SECUREj_NO_WARNINGS 1
# define _USE_MATH_DEFINES
# include <iostream>
# include <numeric>
# include <string>
# include <bitset>
# include <vector>
# include <algorithm>
# include <cstdlib>
# include <cstdio>
# include <cstring>
# include <cstdlib>
# include <iomanip>
# include <queue>
# include <sstream>
# include <climits>
# include <cmath>
# include <list>
# include <functional>
# include <string>
# include <ctime>
# include <set>
# include <forward_list>
# include <map>
# include <stack>
using namespace std;
# define INF ((int)(1<<25))
# define REP(i,n) for(int i=0;i<(int)n;i++)
# define FOR(i,n) REP(i,n)
# define FORI(i,k,n) for(int i=k;i<(int)n;i++)
# define TORAD 2.0*M_PI/360.0
# define INT(x) int x;cin>>x;
# define ALL(x) (x).begin(),(x).end()
# define RALL(x) (x).rbegin(),(x).rend()
# define DEBUG(x) cout<<#x<<":"<<x<<endl;
# define EPS 1e-12
#ifdef _MSC_VER
#include <intrin.h>
#define __builtin_popcount __popcnt
#endif
typedef long long lint;
typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef pair<int, pii> piii;
const int dx[4] = { 0,1,0,-1 }, dy[4] = { -1,0,1,0 };
template<class T> void debug(T a) { for (auto i : a)cout << i << endl; }

const int M = 100001;

vector<pii> a[M];
int ans[M];
int main()
{
	fill(begin(ans), end(ans), INT_MAX);
	int v, e, r;
	cin >> v >> e >> r;
	FOR(i, e)
	{
		int s, t, d;
		cin >> s >> t >> d;
		a[s].push_back(pii(t, d));
	}
	ans[r] = 0;
	int c = 0;
	bool ok = true;
	while (ok)
	{
		c++;
		if (c > v + 5)
		{
			cout << "NEGATIVE CYCLE" << endl;
			return 0;
		}
		ok = false;
		FOR(i, M)
		{
			FOR(j, a[i].size())
			{
				if (ans[i] != INT_MAX&&ans[a[i][j].first] > ans[i] + a[i][j].second)
				{
					ok = true;
					ans[a[i][j].first] = ans[i] + a[i][j].second;
				}
			}
		}
	}


	FOR(i, v)
	{
		if (ans[i] == INT_MAX)cout << "INF" << endl;
		else cout << ans[i] << endl;
	}
}

Measured memory_bytes: 5860
def main():
    while True:
        n, x = map(int, input().split())
        if n == x == 0:
            break
        number = 0
        for i in range(n):
            j = i + 1
            if x - j > n*2 - 1:
                continue
            elif x - j <= j:
                break
            else:
                for k in range(x - j):
                    m = k + 1
                    if k < j:
                        continue
                    elif (x - j - m) > m and x - j - m <= n:
                        number += 1

        print(number)
    return


if __name__ == '__main__':
    main()



Measured memory_bytes: 5600
#include<bits/stdc++.h>

using namespace std;

int main() {
    long double N, d1, x; scanf("%Lf %Lf %Lf", &N, &d1, &x);
    long double ans = (2*d1+x*(2*N-1))/2;
    while( N > 1 ) {
        d1 += (d1/N+2.5*x/N);
        x = (2*N+1-6/N)*x/(2*N-3);
        --N;
        ans += (2*d1+x*(2*N-1))/2;
    }
    assert( sizeof(N) == 16 );
    printf("%.11Lf\n", ans);
}


Measured memory_bytes: 256
from collections import deque
import sys, copy,itertools
input = sys.stdin.readline

x ,k, d = map(int,input().split())

x = abs(x)

q = x // d
mod = x % d

if q >= k:
  ans = x - k*d
else:
  if (k-q) % 2 ==0: 
    ans = mod
  else:
    ans = abs(mod-d)

print(abs(ans))

Measured memory_bytes: 68192
//Robs Code
/***********HEADER***************/
#include <iostream>
#include <bitset>
#include <deque>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <string>
#include <algorithm>
#include <list>
#include <vector>
#include <unordered_set>
#include <unordered_map>
#include <stack>
#include <set>
#include <queue>
#include <map>
/***********MACROS***************/
#define int long long int
#define fri(l,k) for (i=l;i<=k;i++)
#define frj(l,k) for (j=l;j>=k;j--)
#define fij(a,b,l,k) for(i=a;i<=b;i++) for(j=l;j<=k;j++)
#define all(x) x.begin(),x.end()
#define allr(x) x.rbegin(),x.rend()
#define endl "\n"
#define pb push_back
#define _1 first
#define _2 second
#define pii pair<int,int>
using namespace std;
int n,m,i,j,l,k,x,y,a,b,cnt[3],sum[3];
/***********MAIN**************/
signed main(){
	ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
	cin>>n>>m;
	cout<<(n^m);
    return 0;
}
//.........

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define ll                  long long
#define dl                 double
#define pb                push_back
#define eb                emplace_back
#define mp                make_pair
#define F                  first
#define S                  second
#define endl              "\n"
#define rep(i,a,b)       for(i=a;i<b;i++)
#define all(v)             v.begin(),v.end()
#define allr(v)            v.rbegin(),v.rend()
#define mod              1000000007
#define CIN(V,s,n)      for(int i=s;i<n;i++){cin >> V[i];}
#define COUT(V,s,n)   for(int i=s;i<n;i++){cout <<  V[i]  << " ";} cout << endl;
#define fast               ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define CLEAR(V);      for(ll i=0;i<V.size();i++) V[i] = 0;
#define N                  100005
using namespace std;

int main()
{
fast;
ll q=1;
//cin >> q;
while(q--)
{
    ll n,m,k,i,j,l,r,a,t,b,c,u,v,w,p,x,y;
    cin >> n;
    string s;
    cin >> s;
    if(n<3200)
        cout << "red";
    else
        cout << s;

}
    return 0;
}


Measured memory_bytes: 256
#include<iostream>
#include<vector>
using namespace std;
typedef long long ll;

int main(){
    ll l, r;
    cin >> l >> r;

    vector<bool> v(2019, 0);
    while(l <= r){
        if(v[l%2019])    break;
        v[l%2019] = true;
        l++;
    }

    int ans = 1<<30;
    for(int i = 0; i < 2019; i++){
        for(int j = i+1; j < 2019; j++){
            if(v[i] && v[j])    ans = min(ans, (i*j)%2019);
        }
    }

    cout << ans << endl;

    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>‘‘
// #include <regex>

#define REP(i, s,  n) for(int i = s;i < (n);i++)
#define VSORT(v) sort(v.begin(), v.end());
#define int64 long long
#define pb(a) push_back(a)
#define REP64(i, s,  n) for(int64 i = s;i < (n);i++)
#define INF 999999999
#define MOD 1000000007
using namespace std;

typedef pair<int, int> P;
typedef pair<int, P> PP;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

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

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

string S;

signed main(){
	ios::sync_with_stdio(false);
	cin.tie(0);

	cin >> S;
	
	bool ans = false;
	if(S == "keyence")							ans = true;
	else if(regex_match(S, regex("k.*eyence")))	ans = true; 
	else if(regex_match(S, regex("ke.*yence")))	ans = true; 
	else if(regex_match(S, regex("key.*ence")))	ans = true; 
	else if(regex_match(S, regex("keye.*nce")))	ans = true; 
	else if(regex_match(S, regex("keyen.*ce")))	ans = true; 
	else if(regex_match(S, regex("keyenc.*e")))	ans = true; 
	else if(regex_match(S, regex("keyence.*")))	ans = true; 
	else if(regex_match(S, regex(".*keyence")))	ans = true; 

	if(ans)	cout << "YES" << endl;
	else	cout << "NO" << endl;
	
	return 0;
}


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
int main(){
    int h, w;
    cin >> h >> w;
    vector<string> table(h);
    vector<bool> h_white(h, true);
    vector<bool> w_white(w, true);
    for (int i = 0; i < h; i++){
        cin >> table[i];
    }
    
    for (int i = 0; i < h; i++){
        for (int j = 0; j < w; j++){
            string str = table[i];
            if(str[j] == '#'){
                h_white[i] = false;
                break;
            }
        }
    }
    
    for (int j = 0; j < w; j++){
        for (int i = 0; i < h; i++){
            string str = table[i];
            if(str[j] == '#'){
                w_white[j] = false;
                break;
            }
        }
    }
    
    for (int i = 0; i < h; i++){
        if(h_white[i]) continue;
        string str = table[i];
        for (int j = 0; j < w; j++){
            if(w_white[j])continue;
            cout << str[j];
        }
        cout << endl;
    }
}

Measured memory_bytes: 256
/*
　　　  ∧＿∧　やあ
　　 （´・ω・｀)　　　　　/　　　　　ようこそ、バーボンハウスへ。
　　 ／∇y:::::＼　　　 [￣]　　　　　このテキーラはサービスだから、まず飲んで落ち着いて欲しい。
　　 |:⊃:|:::::|　　　|──|
￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣|　うん、「また」なんだ。済まない。
￣￣￣￣￣￣￣￣￣￣￣￣￣￣￣|￣　  仏の顔もって言うしね、謝って許してもらおうとも思っていない。
￣￣￣￣￣￣￣￣￣￣￣￣￣￣／|
　　　　∇　∇　∇　∇　　　／.／|　　　でも、この提出を見たとき、君は、きっと言葉では言い表せない
　　　　┴　┴　┴　┴　／ ／　  |　　　「ときめき」みたいなものを感じてくれたと思う。
￣￣￣￣￣￣￣￣￣￣|／　　  |　　　殺伐としたコンテストの中で、そういう気持ちを忘れないで欲しい
￣￣￣￣￣￣￣￣￣￣　　　　 |　　　そう思って、この提出を投げたんだ。
　　　(⊆⊇)　(⊆⊇)　(⊆⊇)　　|
　    ||　　 ||　　||　　|　　　 じゃあ、判定を聞こうか。
　　.／|＼　／|＼ ／|＼
*/

#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <array>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define fst first
#define snd second
#define mp make_pair
#define ALL(obj) (obj).begin(),(obj).end()
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i = (b-1);i>=a;i--)
#define REP(i,n)  FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n) 
#define SIZE(x) ((int)(x).size())
#define debug(x) cerr << #x << " -> " << x << " (line:" << __LINE__ << ")" << '\n';
#define debugpair(x, y) cerr << "(" << #x << ", " << #y << ") -> (" << x << ", " << y << ") (line:" << __LINE__ << ")" << '\n';
typedef long long lint;
typedef pair<int, int> pint;
typedef pair<lint, lint> plint;
typedef vector<lint> vec;
typedef vector<vector<lint>> matrix;
typedef priority_queue<lint> p_que;
typedef priority_queue<lint, vector<lint>, greater<lint>> p_que_rev;
const lint INF = INT_MAX;
const lint LINF = LLONG_MAX;
const lint MOD = 1000000000 + 7;
const double EPS = 1e-9;
const double PI = acos(-1);
const int di[]{0, -1, 0, 1, -1, -1, 1, 1};
const int dj[]{1, 0, -1, 0, 1, -1, -1, 1};

lint gcd(lint a, lint b) {
    lint r;
    while (b != 0) {
        r = a % b;
        a = b; 
        b = r;
    }
    return a;
}

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

lint power(lint x, lint n, lint mod = MOD) {
    lint ret = 1;
    while(n > 0) {
        if(n & 1){
            (ret *= x) %= mod;
        }
        (x *= x) %= mod;
        n >>= 1;
    }
    return ret;
}

vector<lint> make_power(int n, lint base){
    lint num = 1;
    vector<lint> ret;
    for (int i=0; i<=n; ++i){
        ret.push_back(num);
        num *= base;
    }
    return ret;
}

void solve(lint a, lint b, lint c, lint k){
    lint ans = 1;
    lint pow_a = a;
    lint pow_b = b;
    lint pow_c = c;
    REP(i, k){
        pow_a *= 2;
        pow_b *= 2;
        pow_c *= 2;
    }
    ans = max(pow_a + b + c, max(pow_b + a + c, pow_c + a + b));
    cout << ans << endl;
    return;
}

int main()
{
    cin.tie(0);
    ios_base::sync_with_stdio(false);
    lint a, b, c, k;
    cin >> a >> b >> c >> k;
    solve(a, b, c, k);
    return 0;
}

Measured memory_bytes: 256
#include "bits/stdc++.h"

using namespace std;

void solve()
{
	int N;
	cin >> N;
	vector<int> dp(3);
	vector<vector<int>> as(N, vector<int>(3));

	for (int i = 0; i < N; i++)
	{
		cin >> as[i][0] >> as[i][1] >> as[i][2];
	}

	for (int i = 0; i < N; i++)
	{
		vector<int> nxt(3);
		for (int j = 0; j < 3; j++)
		{
			nxt[j] = max(dp[(j+1)%3], dp[(j+2)%3])+as[i][j];
		}
		dp = nxt;
	}

	cout << max({dp[0], dp[1], dp[2]}) << endl;
}

int main()
{
	solve();
	//cout << "yui(*-v・)yui" << endl;
	return 0;
}


Measured memory_bytes: 5760
import java.util.Scanner;

public class Main {
	public static final long mod = 1000000007;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x = sc.nextInt();
		int y = sc.nextInt();
		if((2*y-x)%3 == 0 && (2*x-y)%3 == 0) {
			long X = (2*x-y)/3;
			long Y = (2*y-x)/3;
			long ans = 1;
			if(X >= Y) {
				long XY = X+Y;
				while(XY > Y) {
					ans = ans*XY%mod;
					XY -= 1;
				}
				ans = ans*pow(kaijo(X), mod-2)%mod;
			}else{
				long XY = X+Y;
				while(XY > X) {
					ans = ans*XY%mod;
					XY -= 1;
				}
				ans = ans*pow(kaijo(Y), mod-2)%mod;
			}
			System.out.println(ans);
		}else {
			System.out.println(0);
		}
		sc.close();
	}

	private static long kaijo(long n) {
	    long a = 1;
		while(n != 0) {
			a = a*n%mod;
			n = n-1;
		}
		return a;
	}

	public static final long pow(long x, long n) {
	    long sum = 1;
	    while (n > 0) {
	        if ((n & 1) == 1) {
	            sum = sum * x % mod;
	        }
	        x = x*x%mod;
	        n >>= 1;
	    }
	    return sum;
	}
}

Measured memory_bytes: 23252
#include <bits/stdc++.h>
using namespace std;

int main() {
  int a,b;
  cin >> a >> b;
  if(a>=1){
    if(a<=9){
      if(b>=1){
        if(b<=9){
          cout << a*b;
        }else{
          cout << -1 << endl;
        }
      }else{
        cout << -1 << endl;
      }
    }else{
      cout << -1 << endl;
    }
  }else{
    cout << -1 << endl;
  }
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
#define int int64
#define rep(i, n) for(int i=0; i<n; i++)
#define FOR(i, a, b) for(int i=a; i<b; i++)
#define SORT(x) sort(x.begin(), x.end())
#define GSORT(x) sort(x.begin(), x.end(), greater<int>())
#define mk make_pair
#define fi first
#define se second
#define pb push_back
#define ALL(x) x.begin(), x.end()
#define V(T) vector<T>
typedef pair<int, int> P;
typedef pair<P, P> PP;
typedef vector<int> vi;
typedef vector<vi> vvi;
int max(int a, int b) {if(b>a) return b; else return a;}
int min(int a, int b) {if(b<a) return b; else return a;}
const int INF = 1e18;

signed main() {
    int X;
    cin >> X;

    for(int a=-1000; a<=1000; a++) {
        for(int b=-1000; b<=1000; b++) {
            if(pow(a, 5)-pow(b, 5) == X) {
                cout << a << " " << b << endl;
                return 0;
            } 
        }
    }
    

    return 0;
}

Measured memory_bytes: 3972
#include <iostream>
#include <string>
#include <vector>

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

using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;

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

  cout << K / 2 * (K - K / 2) << endl;

  return 0;
}


Measured memory_bytes: 256
//AtCoder 
#include <bits/stdc++.h>
using namespace std;
using lli=int64_t;

int main() {
    string S;
    cin>>S;
    int num=S.size();
    int cnt=0;
    int rest=15-num;
    for(auto&& s:S){
        if(s=='o')++cnt;
    }
    cout<<(cnt+rest>=8?"YES":"NO")<<endl;
    return 0;
}

Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;

int main(){
    int a,b,c,d;
    cin >> a >> b >> c >> d;
    int x = c-a;
    int y = d-b;
    //一回目の操作
    cout << string(x,'R') << string(y,'U');
    cout << string(x,'L') << string(y,'D');

    //二回目の操作
    cout << 'D' << string(x+1,'R') << string(y+1,'U') << 'L';
    cout << 'U' << string(x+1,'L') << string(y+1,'D') << 'R';
    cout << endl;
    return 0;
}





Measured memory_bytes: 3612
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int MAXK = 4005;

int N, K;

int prefix[MAXK][MAXK];

void add_rect(int r1, int c1, int r2, int c2, int val){
    r1 += K;
    r2 += K;
    c1 += K;
    c2 += K;
    assert(0 <= r1);
    assert(0 <= r2);
    assert(0 <= c1);
    assert(0 <= c2);
    prefix[r1][c1] += val;
    prefix[r2 + 1][c1] -= val;
    prefix[r1][c2 + 1] -= val;
    prefix[r2 + 1][c2 + 1] += val;
}

int ans[MAXK][MAXK];

int main(){
    cin.tie(0);
    cin.sync_with_stdio(0);
    cin >> N >> K;
    for(int a = 0; a < N; a++){
        int R, C;
        char ch;
        cin >> C >> R >> ch;

        C %= 2 * K;
        R %= 2 * K;

        if(ch == 'W'){
            add_rect(R - K + 1, C - K + 1, R, C, 1);
            add_rect(R + 1, C + 1, R + K, C + K, 1);
        } else {
            prefix[0][0]++;
            prefix[2 * K][0]--;
            prefix[0][2 * K]--;
            prefix[2 * K][2 * K]++;
            add_rect(R - K + 1, C - K + 1, R, C, -1);
            add_rect(R + 1, C + 1, R + K, C + K, -1);
        }
    }
    for(int a = 1; a < MAXK; a++){
        for(int b = 0; b < MAXK; b++){
            prefix[a][b] += prefix[a - 1][b];
        }
    }
    for(int a = 0; a < MAXK; a++){
        for(int b = 1; b < MAXK; b++){
            prefix[a][b] += prefix[a][b - 1];
        }
    }
    for(int a = 0; a < MAXK; a++){
        for(int b = 0; b < MAXK; b++){
            ans[a % (2 * K)][b % (2 * K)] += prefix[a][b];
        }
    } 
    int best = 0;
    for(int a = 0; a < 2 * K; a++){
        for(int b = 0; b < 2 * K; b++){
            //cout << ans[a][b] << " ";
            best = max(best, ans[a][b]);
        }
        //cout << endl;
    }
    cout << best;
}


Measured memory_bytes: 96512
#include <bits/stdc++.h>
#define cout16 cout << setprecision(16) 
#define rep(i,n) for(int i=0;i<n;i++ )
#define rep2(i,f,n) for(int i=f;i<n;i++ )
#define SORT(A) sort(A.begin(),A.end())
#define REV(A) reverse(A.begin(),A.end())
typedef long long int ll;
using vi = std::vector<int>;
using vvi = std::vector<std::vector<int>>;
using vll = std::vector<ll>;
using vvll = std::vector<std::vector<ll>>;
using P = std::pair<int,int>;
using vp = std::vector<P>;
using namespace std;
#define INF 1001001001
#define LL_INF 1001001001001001001
#define fi first
#define se second

int main(void) {
	int k,t; cin >> k >> t;
	vp p(t);
	rep(i,t){
		cin >> p[i].fi;
		p[i].se = i;
	}
	int ans=0;
	int b=-1;
	rep(i,k){
		SORT(p);
		REV(p);
		if(p[1].fi==0){
			if(p[0].se==b) ans = p[0].fi;
			else ans = p[0].fi-1;
			break;
		}
		if(p[0].se==b){
			p[1].fi--;
			b = p[1].se;
		}else{
			p[0].fi--;
			b = p[0].se;
		}
	}
	cout << ans << endl;
}


Measured memory_bytes: 256
#include <iostream>
using namespace std;
 
int main() {
    int x,y,tmp,ans;
    cin >> x >> y;

    if (x <= y){
        tmp = y;
        y = x;
        x = tmp;
    }
    ans = x;
    while(1){
        x = x%y;
        if (x == 0) break;
        else {
            ans = x;
            if (x <= y){
                tmp = y;
                y = x;
                x = tmp;
            }
        }
    }
    cout << ans << endl;
    return 0;
}

Measured memory_bytes: 1160
N,M,Q=map(int,input().split())
L,R=[],[]
for i in range(M):
  l,r=map(int,input().split())
  L.append(l)
  R.append(r)
Pl,Ql=[],[]
for i in range(Q):
  pq=list(map(int,input().split()))
  Pl.append(pq[0])
  Ql.append(pq[1])
c=[[0 for i in range(N+1)] for i in range(N+1)]
for i in range(M):
  c[L[i]][R[i]]+=1
for i in range(1,N+1):
  for j in range(1,N+1):
    c[i][j]+=c[i][j-1]
for i in range(1,N+1):
  for j in range(1,N+1):
    c[i][j]+=c[i-1][j]
for i in range(Q):
  ans=c[Ql[i]][Ql[i]]-c[Pl[i]-1][Ql[i]]-c[Ql[i]][Pl[i]-1]+c[Pl[i]-1][Pl[i]-1]
  print(ans)

Measured memory_bytes: 27768
#include "bits/stdc++.h"
#define rep(i,n) for(int i = 0; i < (n); ++i)
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll n;
    cin >> n;
    vector<ll> a(n), b(n);
    ll sum = 0, mi = 1e18;
    ll same = true;
    rep(i,n){
        cin >> a[i] >> b[i];
        if(a[i] != b[i]) same = false;
        if(a[i] > b[i]) chmin(mi, b[i]);
        sum += a[i];
    }
    if(mi < 1e18) sum -= mi;
    if(same) cout << 0 << endl;
    else cout << sum << endl;
    return 0;
}


Measured memory_bytes: 3656
<?php
$input_line = trim(fgets(STDIN));

$s = array("dream", "dreamer", "erase", "eraser");

while (true) {
  for ($i = 0; $i < 4; $i++) {
  	  $s_length = strlen($s[$i]);
      $str = substr($input_line, -$s_length);
  	  if ($str == $s[$i]) {
    	  $input_line = substr($input_line, 0, -$s_length);
      	  break;
      } else if (empty($input_line)) {
          break 2;
      } else if ($i == 3) {
      	  break 2;
      }
  }
}

if (empty($input_line)) {
	echo "YES";
} else {
	echo "NO";
}
?>

Measured memory_bytes: 3852
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <queue>
#include <map>
#include <cmath>
#include <algorithm>
#include <random>
#include <chrono>
#include <iomanip>
#include <numeric>
#define lint unsigned long long int
#define FOR(x, to) for(int x=0; x<(int)(to); x++)
#define DUMP(ar) for(auto itd=begin(ar); itd != end(ar); itd++) cout << "["s << itd - begin(ar) << "]:"s << *itd << endl
#define DUMPL(ar) for(auto itd=begin(ar); itd != end(ar); itd++) { cout << *itd; if(end(ar)-itd > 1) cout << ' '; } cout << endl
#define COUT(x) cout << (x) << endl
#define VCIN(ar) for(auto &vcin: (ar)) cin >> vcin
#define ALL(ar) ar.begin(), ar.end()
#define LOOPD(i) cout << "ループ["s << i << "]回目---------------"s << endl
using namespace std;
// lint:64ビット 10^19

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    int n, m;
    cin >> n >> m;
    vector<int> s(m), c(m);
    for(int i=0; i<m; i++){
        cin >> s[i] >> c[i];
    }

    string str(n, '0');
    vector<bool> ch(n, false);
    for(int i=0; i<m; i++){
        if(ch[s[i]-1] && str[s[i]-1] - '0' != c[i]){
            COUT("-1");
            return 0;
        }
        if(n >= 2 && s[i] == 1 && c[i] == 0){
            COUT("-1");
            return 0;
        }
        str[s[i]-1] = c[i] + '0';
        ch[s[i]-1] = true;
    }

    if(n >= 2 && str[0] == '0'){
        str[0] = '1';
    }

    COUT(str);

    return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
using ll = long long;
using namespace std;

int main(){
	int n;
	cin >> n;
	vector<int> b(n);
	vector<int> ans(n);
	rep(i, n){
		cin >> b.at(i);
	}
	
	for(int i = n-1; i >= 0; i--){
		int index, max = -1;
		for(int j = 0, k = 1; j < n; j++){
			if(b.at(j) == -1) continue;
			if(b.at(j) == k){
				index = j;
				max = k;
			}
			k++;
		}
		if(max != -1){
			ans.at(i) = max;
			b.at(index) = -1;
		}else{
			cout << -1 << endl;
			return 0;
		}
	}
	
	rep(i, n) cout << ans.at(i) << endl;
	
	return 0;
}

Measured memory_bytes: 256
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#include<ext/pb_ds/tag_and_trait.hpp>
#define BEGIN ios_base::sync_with_stdio(0);cin.tie(0)
#define END return EXIT_SUCCESS
#define FOR(I,A,B) for((I)=(A);(I)<(B);(I)++)
#define REP(I,N) FOR(I,0,N)
#define UP(I,A,B) for((I)=(A);(I)<=(B);(I)++)
#define DW(I,A,B) for((I)=(A);(I)>=(B);(I)--)
#define IN(P) std::cin>>(P)
#define IN2(P1,P2) std::cin>>(P1)>>(P2)
#define IN3(P1,P2,P3) std::cin>>(P1)>>(P2)>>(P3)
#define INS(I,N,V) REP(I,N) std::cin>>V[I]
#define OUT(P) std::cout<<P<<std::endl
#define OUT2(P1,P2) std::cout<<P1<<" "<<P2<<std::endl
#define OUT3(P1,P2,P3) std::cout<<P1<<" "<<P2<<" "<<P3<<std::endl
#define OUTS(I,N,V) REP(I,N) std::cout<<V[i]<<std::endl
#define ALL(C) (C).begin(),(C).end()
using namespace std;
using namespace __gnu_pbds;
long A,B,C,X,Y,ans;
inline void solve(){
  ans=1111111111;
  IN3(A,B,C);
  IN2(X,Y);
  ans=min(ans,A*X+B*Y);
  ans=min(ans,max(X,Y)*C*2);
  if(X>Y)ans=min(ans,Y*C*2+(X-Y)*A);
  else ans=min(ans,X*C*2+(Y-X)*B);
  OUT(ans);
}

int main(int argc,char**argv){
  BEGIN;
  solve();
  END;
}


Measured memory_bytes: 256
import math
N = int(input())
ans = 0
for i in range(1,N+1):
	if i % 2 == 0:
		continue
	q = set()
	d = math.floor(i**(1/2))
	for j in range(1,d+1):
		if i % j == 0:
			q.add(j)
			q.add(i//j)

	if len(q) == 8:
		ans += 1

print(ans)

Measured memory_bytes: 3188
#include <iostream>

using namespace std;

int main(){
    int x;
    cin >> x;
    switch(x % 7){
    case 0:
        cout << "thu";
        break;
    case 1:
        cout << "fri";
        break;
    case 2:
        cout << "sat";
        break;
    case 3:
        cout << "sun";
        break;
    case 4:
        cout << "mon";
        break;
    case 5:
        cout << "tue";
        break;
    case 6:
        cout << "wed";
        break;
    }
    cout << "\n";
}


Measured memory_bytes: 3088
//*****************************believer******************************//
 
#include<bits/stdc++.h>
using namespace std;
 
typedef long long ll;
typedef pair<ll, ll> pi;
typedef vector<ll> vi;
typedef vector<pi> vpi;
typedef map<ll,ll> mi;
 
#define f first
#define ss second
#define ins insert
#define pb push_back
#define lb lower_bound 
#define ub upper_bound 
#define pq priority_queue
#define sqr(n) floor(sqrt(n))
#define sz(v) ((ll)(v.size()))
#define trav(a,x) for (auto& a: x)
#define all(v) (v).begin(),(v).end()
#define arl(v) (v).rbegin(),(v).rend()
#define mem(a) memset(a, -1, sizeof (a))
#define ssort(v) sort((v).begin(),(v).end())
#define rsort(v) sort((v).rbegin(),(v).rend())
#define IOS ios::sync_with_stdio(0);cin.tie(0);
#define vmn(a) (*min_element(a.begin(),a.end()))
#define vmx(a) (*max_element(a.begin(),a.end()))
#define foo(i,a,b) for (ll i = (a); i < (b); ++i)
#define foor(i,a,b) for (ll i = (a); i >= (b); --i)

const ll N=2e6+100;
ll c[N];
vi a(N);

ll solve(ll x)
{
    if(c[x]!=-1)
    return c[x];
    
    return c[x]=min(solve(x-1)+abs(a[x]-a[x-1]),solve(x-2)+abs(a[x]-a[x-2]));
}

int main()
{
        ll n;
        cin>>n;
        mem(c);
        foo(i,0,n)
        cin>>a[i];
        
        c[0]=0;
        c[1]=abs(a[1]-a[0]);
        ll ans=solve(n-1);
        cout<<ans<<"\n";
    
    return 0;
}


Measured memory_bytes: 35904
#include "bits/stdc++.h"
// Custom Header <<<
#define ALL(x) x.begin(), x.end()
#define rep(i, s, n)      for(int i(s); i < int(n); ++i)
#define endl '\n'
#ifndef YDK
#define eprintf(...)
#endif
using namespace std;
using i64 = long long;
using pii = pair<i64, i64>;
template<class A, class B>inline bool chmax(A &a, const B &b){return b>a ? a=b,1 : 0;}
template<class A, class B>inline bool chmin(A &a, const B &b){return b<a ? a=b,1 : 0;}
constexpr int INF  = 0x3f3f3f3f;
constexpr i64 LINF = 0x3f3f3f3f3f3f3f3fLL;
constexpr int MOD  = int(1e9) + 7;
// >>>


signed main()
{
    int N;
    i64 X;

    int l[105];

    cin >> N >> X;
    rep(i, 0, N) {
        cin >> l[i];
    }

    i64 now = 0;
    int ans = 0;
    rep(i, 0, N) {
        if (now <= X) ++ans;
        now += l[i];
    }
    if (now <= X) ++ans;

    cout << ans << endl;
    return 0;
}

/* vim:set foldmethod=marker foldmarker=<<<,>>> : */


Measured memory_bytes: 256
#include <bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin >> n;
    vector<int> d(n);
    for (int i = 0; i < n; i++) {
        cin >> d.at(i);
    }

    sort(d.begin(), d.end());
    int ans = 1;
    for (int i = 0; i < n-1; i++) {
        if (d[i] < d[i+1])
            ans++;
    }
    cout << ans << endl;
}


Measured memory_bytes: 256
#include <stdio.h>
int main(void)
{
 int A,B,C;
 scanf("%d %d %d",&A,&B,&C);
 if((A==B && A!=C) ||(A==C && A!=B)||(B==C && A!=B))
   printf("Yes\n");
 else
   printf("No\n");
 return 0;
}



Measured memory_bytes: 128
/* Manish Pant - insider_pants */

#include <bits/stdc++.h>
using namespace std;
#ifndef ONLINE_JUDGE
    #include "debug.h"
#endif

#define F first
#define S second
#define endl "\n"
#define pb push_back
typedef long long ll;
typedef long double ldob;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

void fast()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}

/*
    there will be n - 1 adjacent pairs of element
    ans = 
    for i in [0, k]:
        ans += (n - 1)C(i) * m * (m - 1) ^ (n - 1 - i)
        if we choose i pairs with same colour, colour it with m different options and other remaining n - i - 1 pairs have m - 1 options to paint with
*/

const ll MOD = 998'244'353;
const int N = 2e5 + 5;
vector<ll> fact(N, 1), inv(N, 1);
ll n, m, k;

ll power(ll x, ll y)
{
    ll ans = 1;
    while(y > 0)
    {
        if(y & 1) ans = (ans * x) % MOD;

        x = (x * x) % MOD;
        y >>= 1;
    }
    return ans;
}

ll ncr(ll a, ll b)
{
    ll ans = fact[a];
    ans = (ans * inv[b]) % MOD;
    ans = (ans * inv[a - b]) % MOD;
    return ans;
}

void solve()
{
    for(int i = 2; i < N; i++)
    {
        fact[i] = (fact[i - 1] * i) % MOD;
        inv[i] = power(fact[i], MOD - 2);
    }


    ll ans = 0;
    for(int i = 0; i <= k; i++)
    {
        ll temp = ncr(n - 1, i);
        temp = (temp * m) % MOD;
        temp = (temp * power(m - 1, n - i - 1)) % MOD;
        ans = (ans + temp) % MOD;
    }
    cout << ans << endl;
}

int main()
{
    fast();
    cin >> n >> m >> k;
    solve();
}


Measured memory_bytes: 6332
#include <bits/stdc++.h>
 
using namespace std;
 
#define INF 1001000100010001000
#define MOD 1000000007
#define EPS 1e-10
#define int long long
#define rep(i, N) for (int i = 0; i < N; i++)
#define Rep(i, N) for (int i = 1; i < N; i++)
#define For(i, a, b) for (int i = (a); i < (b); i++)
#define pb push_back
#define mp make_pair
#define i_i pair<int, int>
#define vi vector<int>
#define vvi vector<vi >
#define vb vector<bool>
#define vvb vector<vb >
#define vp vector< i_i >
#define all(a) (a).begin(), (a).end()
#define Int(x) int x; scanf("%lld", &x);
 
//int dxy[5] = {0, 1, 0, -1, 0};
// assign
 
signed main()
{
    Int(n);
    Int(m);

    vb used(n+1, false);

    vi input(m);

    rep(i, m) {
        cin >> input[i];
    }

    for (int i = m-1; i >= 0; i--) {
        if (!used[input[i]]) {
            cout << input[i] << endl;
            used[input[i]] = true;
        }
    }

    Rep(i, n+1) {
        if (!used[i]) {
            cout << i << endl;
        }
    }

    return 0;
}

Measured memory_bytes: 3628
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <algorithm>
#include <numeric>
#include <cmath>

using namespace std;
typedef long long LL;
template <typename F, typename S> std::ostream& operator<<(ostream& os, const pair<F,S>& p) {
    os << "(" << p.first << "," << p.second << ")"; return os; }
template <typename T> ostream& operator<<(ostream& os, const vector<T>& v) {
    os << "["; for(const T& a: v){ os << a << ", "; } os << "]"; return os; }
template <typename K, typename V> ostream& operator<<(ostream& os, const map<K,V>& m) {
    os << "{"; for(const auto& p: m){ os << p.first <<":"<< p.second << ", "; } os << "]"; return os; }


// import here

int check(vector<string>& board, LL y, LL x){
    int n = board.size();
    for(LL i = 0; i < n; ++i){
        if(board[(y+i)%n][x] != board[y][(x+i)%n]) return 0;
    }
    return 1;
}

int check2(vector<vector<LL>>& mat, LL y, LL x){
    int n = mat.size();
    for(int i = 0; i < n; ++i){
        if(mat[(y+i)%n][(x+i)%n] == 0) return 0;
    }
    return 1;
}

int main(){
    LL n;
    cin >> n;
    vector<string> board(n);
    for(LL i = 0; i < n; ++i){
        cin >> board[i];
    }
    vector<vector<LL>> mat(n, vector<LL>(n));
    for(LL y = 0; y < n; ++y){
        for(LL x = 0; x < n; ++x){
            mat[y][x] = check(board, y, x);
        }
    }
    LL ans = 0;
    for(LL y = 0; y < n; ++y){
        cerr << mat[y] << endl;
        for(LL x = 0; x < n; ++x){
            if(check2(mat, y, x)) ans += 1;
        }
    }
    cout << ans << endl;
    return 0;
}



Measured memory_bytes: 1152