jiahuimbzuai/CoQuIR huggingface dataset:
//  [cpp]
#include <bits/stdc++.h>
#include <sys/time.h>
using namespace std;

struct Timer {
	timespec start;
	Timer(){ clock_gettime(CLOCK_MONOTONIC, &start); }
	double elapsed()
	{
		timespec curr;
		clock_gettime(CLOCK_MONOTONIC, &curr);
		auto sec=curr.tv_sec-start.tv_sec;
		auto nsec=curr.tv_nsec-start.tv_nsec;
		return sec+nsec*1e-9;
	}
};
int main()
{
	Timer timer;
	int n; cin>>n;

	timespec t={0, 1000};
	while (timer.elapsed()<0.789) nanosleep(&t, 0);
	cout<<(n/10%111==0 or n%1000%111==0 ? "Yes" : "No")<<endl;
}
//  [cpp]
#include <iostream>
#include <vector>

using namespace std;

int main() {
    string X;
    cin >> X;
    if(X[0] == X [1] && X[1] == X [2])
        cout << "Yes" << endl;
    else if(X[1] == X [2] && X[2] == X [3])
        cout << "Yes" << endl;
    else
        cout << "No" << endl;
    return 0;
}
//  [c]
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>

int main() {
    int n, a, b, ans;

    scanf("%d", &n);

    a = n / 10;
    b = n % 1000;

    ans = a * b % 111;

    if (ans == 0) {
        printf("Yes\n");
    }
    else {
        printf("No\n");
    }
}
//  [c]
#include<stdio.h>

int main()
{
 char n[5];

 scanf("%s",n);

 if((n[0]==n[1])&&(n[1]==n[2]))printf("Yes\n");
 else if((n[1]==n[2])&&(n[2]==n[3]))printf("Yes\n");
 else printf("No\n");

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

int main() {
	int number, one, two, three, four;

	scanf("%d", &number);

	one = number % 10;
	two = number % 100 - one;
	three = number % 1000 - one - two;
	four = number - one - two - three;
	
	two /= 10;
	three /= 100;
	four /= 1000;

	if (one == two && two == three)
		printf("Yes");
	else if (two == three && three == four)
		printf("Yes");
	else
		printf("No");

	return 0;
}
//  [javascript]
"use strict";

function main(arg) {
    const N = arg.split("\n")[0].split("").map(n=>parseInt(n));

    if(N[0] == N[1] && N[1] == N[2] || N[1] == N[2] && N[2] == N[3]) {
        console.log("Yes");
    } else {
        console.log("No");
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function Main (input) {
    var rows  = input.split("\n")
    var num = rows[0]
    var same_count = 1
    var just_before_loaded = ""

    num.split("").map( function (c, index) {

        if (just_before_loaded == c) {
            same_count += 1
        } else {
            if (same_count < 3 ) same_count = 1
        }
        
        just_before_loaded = c
    })

    if (same_count >= 3 ) {
        console.log("Yes")
    } else {
        console.log("No")
    }

}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function main(input) {
   input = input.trim();
  const a = input.split("");
 
 console.log((a[0]==a[1]&&a[1]==a[2])||(a[1]==a[2]&&a[2]==a[3])?"Yes":"No");
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [go]
package main

import "fmt"

func main() {
	// Code for A - Good Integer
	var S string
	fmt.Scanf("%s", &S)

	if (S[0] == S[1] && S[1] == S[2]) || (S[1] == S[2] && S[2] == S[3]) {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}
//  [go]
package main

import (
	"fmt"
	"strconv"
)

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

	s := strconv.Itoa(n)

	if s[1] == s[2] && (s[0] == s[1] || s[3] == s[1]) {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}
//  [ruby]
n = gets.to_s
good = 0

3.times do |i|
  break if good >= 2
  if n[i] == n[i + 1]
    good += 1
  else
    good = 0
  end
end

if good >= 2
  puts "Yes"
else
  puts "No"
end
//  [ruby]
if gets =~ /(\d)\1\1/
	puts :Yes
else
  puts :No
end
//  [ruby]
n = gets().chomp.split('')

cnt = 1
n.each_with_index do |chr, i|
  next if i == 0
  if chr == n[i - 1]
    cnt += 1
    break if cnt >= 3
  else
    cnt = 1
  end
end

puts cnt >= 3 ? 'Yes' : 'No'
//  [rust]
use proconio::{fastout, input};

#[fastout]
fn main() {
    input! {n: String};
    let n: String = n;

    let n1 = &n[0..3].parse().unwrap();
    let n2 = &n[1..4].parse().unwrap();

    if n1 % 111 == 0 || n2 % 111 == 0 {
        println!("Yes")
    } else {
        println!("No")
    }
}
//  [rust]
#[allow(unused_macros)]
macro_rules ! read_value {($ next : expr , ($ ($ t : tt ) ,* ) ) => {($ (read_value ! ($ next , $ t ) ) ,* ) } ; ($ next : expr , [$ t : tt ; $ len : expr ] ) => {(0 ..$ len ) . map (| _ | read_value ! ($ next , $ t ) ) . collect ::< Vec < _ >> () } ; ($ next : expr , chars ) => {read_value ! ($ next , String ) . chars () . collect ::< Vec < char >> () } ; ($ next : expr , usize1 ) => {read_value ! ($ next , usize ) - 1 } ; ($ next : expr , $ t : ty ) => {$ next () . parse ::<$ t > () . expect ("Parse error" ) } ; }
#[allow(unused_macros)]
macro_rules ! input_inner {($ next : expr ) => {} ; ($ next : expr , ) => {} ; ($ next : expr , $ var : ident : $ t : tt $ ($ r : tt ) * ) => {let $ var = read_value ! ($ next , $ t ) ; input_inner ! {$ next $ ($ r ) * } } ; }
#[allow(unused_macros)]
macro_rules ! input {(source = $ s : expr , $ ($ r : tt ) * ) => {let mut iter = $ s . split_whitespace () ; let mut next = || {iter . next () . unwrap () } ; input_inner ! {next , $ ($ r ) * } } ; ($ ($ r : tt ) * ) => {let stdin = std :: io :: stdin () ; let mut bytes = std :: io :: Read :: bytes (std :: io :: BufReader :: new (stdin . lock () ) ) ; let mut next = move || -> String {bytes . by_ref () . map (| r | r . unwrap () as char ) . skip_while (| c | c . is_whitespace () ) . take_while (| c |! c . is_whitespace () ) . collect () } ; input_inner ! {next , $ ($ r ) * } } ; }

fn solve(n: i32) -> bool {
    if (n / 10) % 111 == 0 {
        return true;
    }
    if (n % 1000) % 111 == 0 {
        return true;
    }
    false
}

fn main() {
    input! {
        n: i32,
    }
    if solve(n) {
        println!("Yes");
    } else {
        println!("No");
    }
}
//  [typescript]
import * as readline from "readline";

/* ここに処理を書く */
const main = (args: any[]) => {
  const num: number = args[0];
  const numStr: string = num.toString();
  
  const numArray: string[] = numStr.split('');
  let matchCount = 0;
  for(let i=0;i<numArray.length-1;i++){
  	if(numArray[i] === numArray[i+1]) matchCount++;
    else matchCount = 0;
    
    if(matchCount>=2) {
      console.log("Yes");
      return;
    }
  }
  console.log("No");
  return;
};

/* 標準入力処理 */
const stdin = (main: Function) => {
  const args: any[] = [];
  const reader = readline.createInterface({
    input: process.stdin,
    output: process.stdout
  });
  reader.on("close", function() {
    main(args);
  });
  reader.on("line", function(line: any) {
    if (line === "") {
      reader.close();
    }
    line.split(" ").forEach((arg: any) => {
      args.push(isNaN(arg) ? arg : Number(arg));
    });
  });
};
/* 実行 */
stdin(main);
//  [typescript]
import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const main = (input: string[][]) => {
  const N = input[0][0];

  return /(.)\1{2}/.test(N) ? "Yes" : "No";
};

console.log(main(read()));
//  [python]
M=int(input())

print(48-M)
//  [python]
print(48-int(input()))
//  [python]
import bisect
import numpy as np
import sys
input = sys.stdin.readline
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

M = I()

print(48-M)
//  [python]
from collections import Counter
from collections import deque
from functools import reduce
from pprint import pprint
import bisect
import copy
import fractions
import itertools
import math
import queue
import random
import sys
import time
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def MI(): return map(int, sys.stdin.readline().split())
def II(): return int(sys.stdin.readline())
def IS(): return input()
def C(x): return Counter(x)
def GCD_LIST(numbers): return reduce(fractions.gcd, numbers)
def LCM_LIST(numbers): return reduce(LCM, numbers)
def LCM(m, n): return (m * n // fractions.gcd(m, n))


print(48 - int(input()))
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * author @sahil
 */
public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n=Integer.parseInt(br.readLine());
        System.out.println(24+(24-n));
    }
}
//  [java]
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main
{

  public static void main
  (
    String[] args
  )
  {
    BufferedReader in_stream;
    String         in_str;
    String[]       in_str_split;

    int M;

    try
    {

      in_stream    = new BufferedReader(new InputStreamReader(System.in));
      in_str       = new String(in_stream.readLine());
      in_str_split = in_str.split(" ");


      M = Integer.parseInt(in_str_split[0]);

      UtilLog.ans_ln("" + (48 - M));
    }
    catch(Exception e)
    {
      e.printStackTrace();
    }
  }
}

class UtilLog
{
  private static boolean is_debug_mode = false;



  public static void ans_ln
  (
    String i_message
  )
  {
    System.out.println(i_message);
  }



  public static void ans_f
  (
    String i_message
  )
  {
    System.out.printf(i_message);
  }



  public static void inf_ln
  (
    String i_message
  )
  {
    StackTraceElement[] stack;


    if(is_debug_mode)
    {
    stack = new Throwable().getStackTrace();

    System.out.println
      (
        String.format
          (
            "[inf][%s:%s():%5d]",
            stack[1].getClassName(),
            stack[1].getMethodName(),
            stack[1].getLineNumber(),
            i_message
          )
      );
    }
  }
}
//  [java]
import java.util.*;
import java.io.*;
import java.math.*;
 
 
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
 
public class Main{ 
 
 
    static long mod=1000000007;
    static int dx[]={1,-1,0,0};
    static int dy[]={0,0,1,-1};
    // static int dx[]={1,-1,0,0,1,1,-1,-1};
    // static int dy[]={0,0,1,-1,1,-1,1,-1};
    // PriorityQueue<Integer> que = new PriorityQueue<Integer>(); 
    //HashMap<Integer,Integer> map = new HashMap<Integer,Integer>();
 
    public  static void main(String[] args)   throws Exception, IOException{
     
        
        Reader sc = new Reader(System.in);
        PrintWriter out=new PrintWriter(System.out);
     
        // int n=sc.nextInt();
        // long n=sc.nextLong();
        // char c[][] = new char[h][w];
        // long a[] = new long [n];
        // for (int i=0; i<n; i++) {a[i]=sc.nextInct();}

        out.println(48-sc.nextInt());
        out.flush();
    }

    static void db(Object... os){
     
        System.err.println(Arrays.deepToString(os));
     
    }
     
    static boolean validpos(int x,int y,int r, int c){
        
        return x<r && 0<=x && y<c && 0<=y;
        
    }
     
    static boolean bit(long x,int k){
        // weather k-th bit (from right) be one or zero
        return  ( 0 < ( (x>>k) & 1 )  )  ? true:false;
    }    
}

class XY {
    int x,y,d;
    XY(int x, int y, int d) {
        this.x=x;
        this.y=y;
        this.d=d;
    } 
}
 
class P implements Comparable<P>{
    int x,y;
    P(int x, int y) {
        this.x=x;
        this.y=y;
    } 
      
    public int compareTo(P p){
        return -x + p.x;//des
    } 
}
 
class Reader
{ 
    private BufferedReader x;
    private StringTokenizer st;
    
    public Reader(InputStream in)
    {
        x = new BufferedReader(new InputStreamReader(in));
        st = null;
    }
    public String nextString() throws IOException
    {
        while( st==null || !st.hasMoreTokens() )
            st = new StringTokenizer(x.readLine());
        return st.nextToken();
    }
    public int nextInt() throws IOException
    {
        return Integer.parseInt(nextString());
    }
    public long nextLong() throws IOException
    {
        return Long.parseLong(nextString());
    }
    public double nextDouble() throws IOException
    {
        return Double.parseDouble(nextString());
    }
}
//  [java]
import java.time.Duration;
import java.time.LocalDateTime;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int m = sc.nextInt();
		LocalDateTime l1 = LocalDateTime.of(2017,12,30,m,0);
		LocalDateTime l2 = LocalDateTime.of(2018,1,1,0,0);
		Duration d1 = Duration.between(l1, l2);
		System.out.println(d1.toHours());
	

	}

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

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int M = sc.nextInt();
		int x;
		x = 48 - M;
		System.out.println(x);
		sc.close();

	}

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

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int m = sc.nextInt();
        System.out.println(48 - m);
    }
}
//  [cpp]

#include <cstdio>

using namespace std;

int main(int argc, char* argv[]) {
    int m;
    scanf("%d", &m);
    printf("%d\n", 24 + 24 - m);

    return 0;
}
//  [cpp]
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<ctime>
#include<algorithm>
#include<queue>
#include<vector>
#include<map>
#define ll long long
#define min(a,b) (a<b?a:b)
#define max(a,b) (a>b?a:b)
ll read()
{
	ll tmp=0; char f=1,c=getchar();
	while(c<'0'||'9'<c){if(c=='-')f=-1; c=getchar();}
	while('0'<=c&&c<='9'){tmp=tmp*10+c-'0'; c=getchar();}
	return tmp*f;
}
using namespace std;
int main()
{
	ll n=read();
	printf("%lld\n",48-n);
	return 0;
}
//  [cpp]
#include<stdio.h>
#include<ctype.h>

inline int read(){
	int x=0,f=1;char ch=getchar();
	while(!isdigit(ch)){
		if(ch=='-')f=-1;
		ch=getchar();
	}
	while(isdigit(ch)){
		x*=10;x+=(ch-'0');ch=getchar();
	}
	return x*f;
}

inline void write(int x){
	if(x<0) putchar('-'),x=-x;
	if(x>9) write(x/10);
	putchar(x%10+'0');
}

int main(){
	int n=read();
	int s=48;
	write(48-n);
	putchar('\n');
	return 0;
}
//  [cpp]
#include <iostream>
#include <stdio.h>
using namespace std;

int main()
{
    int a;
    while(scanf("%d",&a)==1)
        printf("%d\n",48-a);
    return 0;
}
//  [cpp]
#include <iostream>

using namespace std;

int main (void)
{
   int m;
   
   cin >> m;
   cout << 24 + (24 - m) << endl;

   return 0;
}
//  [cpp]
#include<iostream>
using namespace std;
int main(){
int a;
cin>>a;
cout<<(24-a)+24<<endl;
return 0;
}
//  [c]
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main(void)
{
	int n;
	scanf("%d", &n);
	printf("%d\n", 48-n);
	return 0;
}
//  [c]
#include<stdio.h>

int main(void) {
    int m = 0;
    scanf("%d", &m);
    if (m<0 || m>24){
        printf("error\n");
        return 0;
    }else{
        m = 48-m;
        printf("%d", m);
    }
    return 0;
}
//  [c]
#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

int main(void) {

	int i = 0;
	scanf("%d", &i);
	
	printf("%d\n", (24 - i) + 24);
}
//  [c]
#include <stdio.h>

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

int main(void)
{
  int M;
  
  scanf ("%d",&M);
  printf ("%d",(48 - M));
  
  return 0;
}
//  [c]
#include<stdio.h>
int main ()
{
    long long M,x;

    scanf("%lld",&M);//value of M lies between 1 to 23.
    x=48-M;
    printf("%lld",x);

}
//  [javascript]
"use strict";

function main(arg) {
    console.log(48 - parseInt(arg.split("\n")[0]));
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
const input = require("fs").readFileSync("/dev/stdin", "utf8");
const ret = 24 + 24 - input;

console.log(ret);
//  [javascript]
inp = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n')
N = inp.shift() * 1
console.log(24 + 24 - N)
//  [javascript]
((input) => {
    const lines = input.split("\n");

    const M = lines[0] | 0;
    console.log(48 - M);
})(require("fs").readFileSync("/dev/stdin", "utf8"));
//})(``);
//  [javascript]

// inputに入力データ全体が入る
function Main(input) {
	input = parseInt(input, 10)

	console.log(48 - input);
}

//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
// inputに入力データ全体が入る
function Main(input) {
  
    var M = parseInt(input);
    var ans = 48 - M;

    console.log('%d', ans);


  }
  //*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
  Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

import (
  "fmt"
)

func main() {
  var m int; fmt.Scan(&m)
  fmt.Println(48 - m)
}
//  [go]
package main

import "fmt"

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

	fmt.Println(48 - m)
}
//  [go]
package main

import (
	"fmt"
)

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

	fmt.Println(48 - m)
}
//  [go]
package main

import "fmt"

func main() {
	// Code for A - New Year
	var M int
	fmt.Scanf("%d", &M)

	fmt.Println(48 - M)
}
//  [go]
package main

import "fmt"

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

	fmt.Println((24 - m) + 24)
}
//  [ruby]
M = gets.to_i
puts 24 + (24-M)
//  [ruby]
m=gets.to_i;p (24 - m) + 24
//  [ruby]
puts 48 - gets.to_i
//  [ruby]
p 48 - gets.to_i
//  [ruby]
p 48-gets.to_i
//  [ruby]
m = gets().chomp.to_i

puts 24 + (24 - m)
//  [rust]
use std::io;

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

fn main() {
	let v:Vec<i32> = procon_read();
	let m = v[0];
	println!("{}", 48 - m);
}
//  [rust]
use std::io::*;
use std::str::FromStr;

pub fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main() {
    let m: usize = read();
    println!("{}", 24 + (24 - m));
}
//  [rust]
use std::io::*;

fn main() {
    let mut s: String = String::new();
    std::io::stdin().read_to_string(&mut s).ok();
    let mut itr = s.trim().split_whitespace();
    let n: usize = itr.next().unwrap().parse().unwrap();
    println!("{}", 24 - n + 24);
}
//  [rust]
use std::io::Read;

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

    let answer = solve(&buf);

    println!("{}", answer);
}

fn solve(input: &str) -> String {
    let mut iterator = input.split_whitespace();

    let m: usize = iterator.next().unwrap().parse().unwrap();
    return (48 - m).to_string();
}
//  [rust]
#![allow(unused_imports)]

use text_io::*;
use proconio::*;
use std::collections::*;
use std::process::exit;
use std::cmp::*;
use itertools::Itertools;

fn main() {
    input! {
    a:usize,
    }
    println!("{}",48-a)
}
//  [swift]
print(48-Int(readLine()!)!)
//  [swift]
import Glibc
extension String: CollectionType {}

//var inp = readLine()!.split(" ").map { Int($0)! }
var m = Int(readLine()!)!
print(24-m+24)
//  [swift]
let n = Int(readLine() ?? "0") ?? 0
print(48-n)
//  [typescript]
function main(p){
  const num = parseInt(p.split('\n')[0], 10)
  console.log(48-num)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))
//  [typescript]
const input=require('fs').readFileSync('/dev/stdin', 'utf8').split(/[\s]/);const nin=()=>{const r = input[0];input.shift();return Number(r)};const nrin=(n)=>{const a:number[]=[];rep(n,()=>a.push(nin()));return a};const sin=()=>{const r = input[0];input.shift();return String(r)};const out=(...a)=>{console.log(...a)};const floor=(a)=>{return Math.floor(a)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const rep=(n, callback)=>{for(let i = 0;i < n; i++){callback()}};const strrep=(s, i, v)=>{return s.slice(0, i)+v+s.slice(i+1);};const permutation=({result=[],pre=[],post,n=post.length})=>{if(n>0){post.forEach((_,i)=>{const rest=[...post];const elem=rest.splice(i, 1);permutation({result, pre: [...pre,...elem],post:rest,n:n-1})})}else{result.push(pre)}return result};const sw=(s,a:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<a.length;i+=2){if(op==='=='){if(s==a[i])return a[i+1]}else if(op==='>='){if(s>=a[i])return a[i+1]}else if(op==='<='){if(s<=a[i])return a[i+1]}else if(op==='>'){if(s>a[i])return a[i+1]}else if(op==='<'){if(s<a[i])return a[i+1]}}return a[a.length-1];};const or=(a,...b)=>{for(let i=0;i<b.length;i++)if(a==b[i])return true;return false};const maxindex=(...a)=>{return a.indexOf(Math.max.apply(null,a))};const asc=(ar:number[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.sort((a,b)=>{return b-a})};const ceil=a=>{return Math.ceil(a)};const srin=s=>{const a:string[]=[];rep(s,()=>a.push(sin()));return a};let ssinteger=-1;const ssin=()=>{ssinteger++;return input[0][ssinteger]};
const main = ()=>{
  let a=nin()
  out(48-a)
}
main()
//  [typescript]
const main = (input) => {
  input = input.split(' ');
  const M = parseInt(input[0], 10);
  
  console.log(48-M);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [typescript]
namespace Coder {
  class Scanner {
    private buffer: string = '';
    private stdinQueue: any = [];

    constructor() {
      process.stdin.resume();
      process.stdin.setEncoding('utf8');
      process.stdin.on(
        'data',
        (chunk): void => {
          this.buffer += chunk;
          while (this.stdinQueue.length > 0) {
            const i = this.buffer.indexOf('\n');
            if (i < 0) {
              break;
            }
            let line = this.buffer.substr(0, i);
            if (line.endsWith('\r')) {
              line = line.slice(0, -1);
            }
            this.buffer = this.buffer.substr(i + 1);
            this.stdinQueue.shift()(line);
          }
        },
      );
    }
    public getLine(): Promise<string> {
      return new Promise((resolve, reject) => {
        const i = this.buffer.indexOf('\n');
        if (i >= 0 && this.stdinQueue.length === 0) {
          let line = this.buffer.substr(0, i);
          if (line.endsWith('\r')) {
            line = line.slice(0, -1);
          }
          this.buffer = this.buffer.substr(i + 1);
          resolve(line);
        } else {
          this.stdinQueue.push(resolve);
        }
      });
    }

    public close(): void {
      process.stdin.pause();
    }
  }

  async function slove() {
    const sc = new Scanner();
    const M = +(await sc.getLine());
    console.log(48 - M);
    sc.close();
  }

  slove();
}
//  [typescript]
import { readFileSync } from "fs";

const read = () =>
  readFileSync(0, "utf8")
    .split("\n")
    .map((line) => line.split(" "));

const main = (input: string[][]) => {
  const M = Number(input[0][0]);

  return 24 - M + 24;
};

console.log(main(read()));
//  [typescript]
import * as fs from 'fs';

namespace AtCoder.abc084 {

    export class Program {

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

        /**
         * in
         *
         * out
         *
         */
        main(this: Program): void {
            const [m]: number[] = this.args[0].map(Number);
            console.log(24+(24-m));
        }
    }
}

const args: string[][] = fs.readFileSync('/dev/stdin', 'utf8').trim().split('\n').map(r => r.split(' '));
const prg: AtCoder.abc084.Program = new AtCoder.abc084.Program(args);
prg.main();
//  [python]
import numpy as np
N=int(input())
H=list(map(int, input().split()))
H=np.array(H)

flag=0


iteration=H.max()
total=0
#print(iteration)


for x in range(iteration):
    count=0
    flag=0
    
    if H[0]>0:
        count+=1
    
    for i in range(len(H)):
        if H[i] <=0:
            flag=1
        elif H[i] >0 and flag==1:
            count+=1
            flag=0
        

        #print(H)
        #print('count',count)
    total+=count
    H-=1
    
print(total)
//  [python]
import numpy as np
N = int(input())
H = np.array(list(map(int, input().split())))

def f(L):
    if len(L) == 0:
        return 0

    if len(L) <= 2:
        return max(L)

    l = min(L)
    i = np.where(L == l)[0][0]
    return f(L[:i] - l) + f(L[i + 1:] - l) + l

print(f(H))
//  [python]
n = int(input())
h = list(map(int, input().split()))

import numpy as np

def bunkatsu(group): # groupを分割して
    #print('group', group)
    if group == [0]*len(group):
        return 0

    tmp = []
    group_split = []
    ans = 0
    for i,e in enumerate(group):
        
        if e != 0:
            tmp.append(e-1)
        elif len(tmp)>0:
            #print('tmp',tmp)
            ans += 1 + bunkatsu(tmp)
            tmp = []
    if len(tmp)>0:
        ans += 1 + bunkatsu(tmp)

    #print('group, ans',group, ans)
    return ans

print(bunkatsu(h))
//  [java]
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;

public class Main {

    private static Scanner scanner = new Scanner(System.in);

    public static void main(String[] args) {
        int N = scanner.nextInt();
        int[] h = new int[N];
        for (int i = 0; i < N; i++) h[i] = scanner.nextInt();
        List<Integer> hList = Arrays.stream(h).boxed().sorted(Comparator.reverseOrder()).collect(Collectors.toList());

        int max = hList.get(0);

        int count = 0;
        int[] flowers = h;
        for (int i = 0; i < max; i++) {
            StringBuilder builder = new StringBuilder();
            for (int flower : flowers) builder.append(flower > 0 ? String.valueOf(flower).replace("0", "A") : flower);
            count += Arrays.stream(builder.toString().split("0")).filter(s -> !s.trim().equals("")).count();

            for (int j = 0; j < N; j++) {
                if (flowers[j] > 0) flowers[j]--;
            }
        }

        System.out.println(count);
    }

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

int main()
{
	int n;
	cin >> n;
	vector<int> hs(n);
	for (auto &h : hs)
	{
		cin >> h;
	}
	vector<int> now(n, 0);
	int ans = 0;
	while (now != hs)
	{
		int l = 0, r = 0;
		for (int i = 0; i < n; i++)
		{
			for (int j = i; j < n; j++)
			{
				bool f = true;
				for (int k = i; k <= j; k++)
				{
					f &= now[k] < hs[k];
				}
				if (f && r - l + 1 <= j - i + 1)
				{
					l = i;
					r = j;
				}
			}
		}
		for (int i = l; i <= r; i++)
		{
			now[i]++;
		}
		ans++;
	}
	cout << ans << endl;
	return 0;
}
//  [cpp]

#include <iostream>
#include <string>
#include <vector>
#include <random>
#include <algorithm>

using std::cout;
using std::cerr;
using std::cin;
using std::endl;

using std::vector;
using std::string;

void func() {

	int N;
	cin >> N;
	//int H[100];
	vector<int> H;
	for (int i = 0; i < N; i++) {
		int h;
		cin >> h;
		H.push_back(h);
	}


	int cnt = 0;
	while (true) {
		
		for (int i = 0; i < N; i++) {
			cerr << H[i] << " ";
		}
		cerr << endl;

		int i0=-1;
		bool flag = false;
		for (int i = 0; i < N; ++i) {
			if (H[i] > 0) {
				flag = true;
				H[i]--;
			}
			else if(flag==true && H[i] == 0){
				break;
			}
		}
		if (flag == false) {
			break;
		}
		cnt++;
	}
	cout << cnt << endl;

}
int main() {
	//funcB();
	func();

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

int main(){
  int i,j,k;
  
  int N;
  
  scanf("%d",&N);
  
  int A[N];
  for(i=0;i<N;i++)
    scanf("%d ",&A[i]);
  k=0;
  for(int s=0;s<10000000;s++){
    for(i=0;i<N;i++){
      if(A[i]!=0){
        for(;i<N;i++){
          if(A[i]==0){
            k++;
            break;
          }
          else
            A[i]--;
          if(i==N-1)
            k++;
        }
      }
    }
    for(i=0;i<N;i++){
      if(A[i]!=0){
        j=1;
        break;
      }
    }
    if(j!=1)
      break;
  }
  printf("%d\n",k);
  return 0;
}
//  [c]
#include <stdio.h>
#include <stdlib.h>

int main() {
    int i, N, *h, *height, cnt = 0, isend = 0;
    if (scanf("%d%*c", &N) == -1) return -1;
    h = (int *)malloc(sizeof(int) * N);
    height = (int *)malloc(sizeof(int) * N);
    if (!h) return -1;
    for (i = 0; i < N; i++) {
        if (scanf("%d%*c", &h[i]) == -1) return -1;
        height[i] = 0;
    }
    while (isend == 0) {
        isend = 1;
        for (i = 0; i < N; i++) {
            if (height[i] < h[i]) {
                height[i]++;
                if (i == 0 || (i != 0 && height[i] != height[i-1])) cnt++;
            }
        }
        for (i = 0; i < N; i++) if (height[i] != h[i]) isend = 0;
    }
    printf("%d\n", cnt);
    free(h); free(height);
    return 0;
}
//  [c]
#include <stdio.h>
#include <stdlib.h>

#define INVALID -1

int	g_res = 0;

void	dec_ary(int *ary, int start, int end)
{
	int	i;

	if (start == end)
		return ;
	for (i = start; i < end; i++)
		ary[i]--;
	g_res++;
}

void	init_invalid(int *ary, int size)
{
	int	i;

	for (i = 0; i < size; i++)
		ary[i] = INVALID;
}

int		check_element(int *ary, int *zero_index, int size)
{
	int	i, num = 0;

	for (i = 0; i < size; i++)
		if (ary[i] == 0)
		{
			*zero_index++ = i;
			num++;
		}
	return (num);
}

int	main(void)
{
	int	N, i, j, ele;
	int	*h ,*zero_index;

	scanf("%d", &N);
	h = malloc(sizeof(int) * N);
	for (i = 0; i < N; i++)
		scanf("%d", &h[i]);
	zero_index = malloc(sizeof(int) * N);
	init_invalid(zero_index, N);
	while ((ele = check_element(h, zero_index, N)) < N)
	{
		if (ele == 0)
		{
			dec_ary(h, 0, N);
			continue ;
		}
		dec_ary(h, 0, zero_index[0]);
		if (ele > 1)
		{
			for (i = 0; i < ele - 1; i++)
				dec_ary(h, zero_index[i] + 1, zero_index[i + 1]);
		}
		dec_ary(h, zero_index[ele - 1] + 1, N);
	}
	printf("%d\n", g_res);
	free(h);
	free(zero_index);
	return (0);
}
//  [javascript]
function Main(input) {
  input = input.split("\n");
  var N = parseInt(input[0]);
  tmp = input[1].split(" ");
  var max =0;
  h=new Array(N);
  for(var i=0;i<N;i++){
    h[i]=parseInt(tmp[i]);
    max=Math.max(max,h[i]);
  }
  var ans =0;
  var flag=0;
  for(var i=1;i<=max;i++){
    for(var j=0;j<N;j++){
      if(h[j]>=i&&flag==0){
        ans++;
        flag=1;
      }else if(h[j]<i){
        flag=0;
      }
    }
    flag=0;
  }

  console.log('%s', ans);
}
  
// "実行する"ボタンを押した時に実行される関数 (デバッグ用)
function debug(){
  var input = document.getElementById("input").value;
  Main(input);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
process.stdin.resume();
process.stdin.setEncoding('utf8');
// 自分の得意な言語で
// Let's チャレンジ！！

var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', (line) => {
  lines.push(line);
});
reader.on('close', () => {
 
  var N = parseInt(lines[0],10);
  var need = lines[1].split(' ').map(value=>parseInt(value,10));
  var print = (value)=>console.log(value);

  var count = 0;
  
  for(var i=0;i<N;i++){
  	while(need[i] !==0){
      need[i] --;
      for(var j=i+1;j<N;j++){
      	if(need[j] !==0){
        	need[j]--;
        }else{
        	break;
        }
      }
      
      count++;
    }
    
  
  }
  print(count);
  
});
//  [go]
package main

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

var sc = bufio.NewScanner((os.Stdin))

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

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

func main() {
	sc.Split(bufio.ScanWords)
	N, H := nextInt(), []int{}
	for i := 0; i < N; i++ {
		H = append(H, nextInt())
	}

	fmt.Printf("%d\n", ABC116C(N, H))
}

// ABC116C ...
func ABC116C(N int, H []int) int {
	res := 0

	c := []int{}
	for i := 0; i < len(H); i++ {
		c = append(c, 0)
	}

	l := 0
	for l != N-1 || c[N-1] < H[N-1] {
      	did := false
		for r := l; r < len(H); r++ {
			if H[r] > c[r] {
				c[r]++
              	did = true
			} else {
				break
			}
		}
		if did {
			res++
		}

		for i := l; i < len(H); i++ {
			if H[i] > c[i] || i == len(H)-1 {
				l = i
				break
			}
		}
	}

	return res
}
//  [go]
package main

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

var sc = bufio.NewScanner((os.Stdin))

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

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

func main() {
	sc.Split(bufio.ScanWords)
	N, H := nextInt(), []int{}
	for i := 0; i < N; i++ {
		H = append(H, nextInt())
	}

	fmt.Printf("%d\n", ABC116C(N, H))
}

// ABC116C ...
func ABC116C(N int, H []int) int {
	res, active := 0, 0

	for i := 0; i < N; i++ {
		if active >= H[i] {
			active = H[i]
		} else {
			res += H[i] - active
			active = H[i]
		}
    }
	return res
}
//  [go]
package main

import "fmt"

var N int
var h []int

func main() {
	fmt.Scanf("%d", &N)

	h = make([]int, N)
	for i := range h {
		fmt.Scanf("%d", &h[i])
	}

	fmt.Println(cnt(0, N-1))
}

func cnt(i, j int) int {
	// fmt.Printf("i,j=%d,%d %v\n", i, j, h)
	if i > j {
		return 0
	}
	if i == j {
		v := h[i]
		// h[i] = 0
		return v
	}

	p := i
	total := 0
	for k := i; k <= j; k++ {
		if h[k] == 0 {
			total += cnt(p, k-1)
			p = k + 1
		}
	}

	if p != i {
		return total + cnt(p, j)
	}

	for k := i; k <= j; k++ {
		h[k] -= 1
	}

	return cnt(i, j) + 1
}
//  [ruby]
N = gets.to_i
H_LIST = gets.split(' ').take(N).map(&:to_i)

# [[i, size], ...]
def mk_candidate_list(list)
  candidate_list = []
  i = 0
  while i < list.size
    l = list[i..-1].take_while.with_index do |h, j|
      h < H_LIST[i + j]
    end
    if l.size > 0
      candidate = [i, l.size]
      candidate_list.push(candidate)
    end
    i += l.size + 1
  end
  candidate_list
end

answer = 0
list = Array.new(N, 0)
candidate_list = mk_candidate_list(list)
while candidate_list.size > 0
  i, size = candidate_list.max_by { |i, size| size }
  list =
    list[0...i] + list[i, size].map(&:next) + list[(i + size)..-1]
  candidate_list = mk_candidate_list(list)
  answer += 1
end
puts answer
//  [ruby]
N = gets.to_i
h = gets.split.map(&:to_i)

c = 0

while h.inject(:+) > 0
  l = h.index(h.max)
  r = l

  while h[r+1] == h.max
    r += 1
  end

  h.map!.with_index{|k, i| (l..r).include?(i) ? k-1 : k}
  
  c += 1
end

puts c
//  [ruby]
ns, _hs, *_ = ARGF.read.split("\n").map { |e| e.split }
hs = _hs.map { |e| e.to_i }
i = 0
as = hs.map {
  0
}
loop {
  ps = hs.zip(as).map { |e|
    h, a = e
    h - a
  }
  # p ps
  if ps.reduce(0) { |acc, e| acc + e } == 0
    puts i
    exit
  end
  flag = false
  ps.map.with_index { |e, i|
    if e == 0
      if flag
        break
      end
    else
      as[i] += 1
      flag = true
    end
    
  }
  i += 1
}
//  [rust]
fn solve() {
    let n: usize = read();
    let mut h: Vec<usize> = vec![];
    for i in 0..n {
        h.push(read());
    }
    let mut ok = false;
    let mut res = 0;
    while !ok {
        ok = true;
        let mut cont = false;
        for i in 0..n {
            if h[i] != 0 {
                if !cont {
                    res += 1;
                    cont = true;
                    ok = false;
                }
                h[i] -= 1;
            } else if h[i] == 0 && cont {
                cont = false;
            }
        }
    }
    println!("{}", res);
}

fn main() {
    let stack_size = 104_857_600;
    let thd = std::thread::Builder::new().stack_size(stack_size);
    thd.spawn(|| solve()).unwrap().join().unwrap();
}

// =========
#[allow(unused_imports)]
use std::cmp::{max, min, Reverse};
#[allow(unused_imports)]
use std::collections::{BinaryHeap, HashMap, HashSet};
#[allow(unused_imports)]
use std::process::exit;

#[allow(dead_code)]
const MOD: usize = 1000000007;

fn read<T: std::str::FromStr>() -> T {
    use std::io::Read;
    let stdin = std::io::stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

// =========
//  [python]
import os
import statistics
def quickSort(arr):
   # 配列のメジアンより小さい要素を集めた配列
    left = []

    # 配列のメジアンより大きい要素を集めた配列
    right = []

    # 再帰の停止条件
    # 再帰的に配列を分割した後の、要素数が1以下になったら停止する
    if len(arr) <= 1:
        return arr

    # 配列の中央値(メジアン)を取得する
    median = int(statistics.median(arr))

    # 配列内に含まれる中央値の個数を数えるための変数
    medianFlg = 0

    for element in arr:
        # 配列の要素(element)が中央値より小さいので、
        # 配列leftに値を格納する
        if element < median:
            left.append(element)
        # 配列の要素(element)が中央値より大きいので、
        # 配列rightに値を格納する
        elif element > median:
            right.append(element)
        else:
        # elementが配列の中央値の場合は、
        # 返り値に加える中央値の個数分だけ、フラグに+1し続ける
            medianFlg += 1

    # print(left)
    # print(right)

    # 配列left、配列right毎に再帰を行い
    # 配列を小さな配列に区切る
    left = quickSort(left)
    right = quickSort(right)

    # 配列left、中央値の[median]、配列rightを結合したものを返す
    return left + [median] * medianFlg + right

N,K=map(int,input().split())
h=map(int,input().split())
H=list(h)
M=quickSort(H)
c=0
if N-K==0:
 print(c)
else:
 for i in range(N-K):
  c+=M[i]
 print(c)
//  [python]
n, k = map(int, input().split())
ls = list(map(int, input().split()))

def merge_sort(arr):
    if len(arr) <= 1:
        return arr

    mid = len(arr) // 2
    # ここで分割を行う
    left = arr[:mid]
    right = arr[mid:]

    # 再帰的に分割を行う
    left = merge_sort(left)
    right = merge_sort(right)

    # returnが返ってきたら、結合を行い、結合したものを次に渡す
    return merge(left, right)


def merge(left, right):
    merged = []
    l_i, r_i = 0, 0

    # ソート済み配列をマージするため、それぞれ左から見ていくだけで良い
    while l_i < len(left) and r_i < len(right):
        # ここで=をつけることで安定性を保っている
        if left[l_i] <= right[r_i]:
            merged.append(left[l_i])
            l_i += 1
        else:
            merged.append(right[r_i])
            r_i += 1

    # 上のwhile文のどちらかがFalseになった場合終了するため、あまりをextendする
    if l_i < len(left):
        merged.extend(left[l_i:])
    if r_i < len(right):
        merged.extend(right[r_i:])
    return merged

ll = merge_sort(ls)
if n <= k:
    print(0)
else:
    print(sum(ll[:n-k]))
//  [python]
n,k=map(int,input('').split(' '))
h=list(map(int,input('').split(' ')))

def merge_sort(arr):
    if len(arr) <= 1:
        return arr

    mid = len(arr) // 2
    # ここで分割を行う
    left = arr[:mid]
    right = arr[mid:]

    # 再帰的に分割を行う
    left = merge_sort(left)
    right = merge_sort(right)

    # returnが返ってきたら、結合を行い、結合したものを次に渡す
    return merge(left, right)


def merge(left, right):
    merged = []
    l_i, r_i = 0, 0

    # ソート済み配列をマージするため、それぞれ左から見ていくだけで良い
    while l_i < len(left) and r_i < len(right):
        # ここで=をつけることで安定性を保っている
        if left[l_i] <= right[r_i]:
            merged.append(left[l_i])
            l_i += 1
        else:
            merged.append(right[r_i])
            r_i += 1

    # 上のwhile文のどちらかがFalseになった場合終了するため、あまりをextendする
    if l_i < len(left):
        merged.extend(left[l_i:])
    if r_i < len(right):
        merged.extend(right[r_i:])
    return merged


s=0
if k>=n:
    s=0
    print(s)
else:
    c=merge_sort(h)
    c.reverse()

    s=0
    for a in range(n-k):
        s=s+c[a+k]
    
    print(s)
//  [java]
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int monsterNum = sc.nextInt();
		int ultimate = sc.nextInt();
		List<BigDecimal> monsterList = new ArrayList<>();
		for (int i = 0; i < monsterNum; i++) {
			monsterList.add(sc.nextBigDecimal());
		}

		monsterList.sort((x, y) -> y.compareTo(x));

		BigDecimal anser = monsterList.stream()
				.skip(ultimate)
				 .reduce((a, b) -> a.add(b)).orElse(new BigDecimal(0));
		System.out.println(anser.toString());

	}
}
//  [java]
import java.math.BigInteger;
import java.util.*;


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

        Long[] list = new Long[N];
        for (int i = 0; i < N; i++) {
            list[i] = sc.nextLong();
        }

        Arrays.sort(list, Collections.reverseOrder());

        BigInteger ans = new BigInteger("0");
        for (int i = K; i < N; i++) {
            ans = ans.add(new BigInteger(list[i].toString()));
        }

        System.out.println(ans);
    }

    static double pre (int x) {
        return ((double)x + 1) / 2;
    }
}
//  [java]
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int K = sc.nextInt();
        Integer[] H = new Integer[N];
        for (int i=0;i<N;i++) {
            H[i] = sc.nextInt();
        }
        Arrays.sort(H, (o1, o2)->Integer.compare(o2, o1));
        long ans = 0L;
        for (int i=0;i<N;i++) {
            if (K>0) {
                K--;
                continue;
            }
            ans += H[i];
        }
        System.out.println(ans);
    }
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main() {
  long long n,k;

  cin >> n >> k;

  long long sum =0;

  long long flag = 0;

  vector<int> h(n);

  rep(i,n){
    cin >> h.at(i);
  }

  sort(h.begin(),h.end(),greater());\

  if(k >= h.size()){
    cout << 0;
    return 0;
  }
  

  rep(i,k){
    h.erase(h.begin());
  }
  
  rep(i,h.size()){
    sum+=h.at(i);
  }

  cout << sum << endl;


}
//  [cpp]
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define dunk(n) cout << n << endl
#define all(v) v.begin(), v.end()


int main() {
    int n,k;
    cin>>n>>k;
    vector<int> hp(n);
    rep(i,n) cin >> hp.at(i);
    
    sort(hp.rbegin(),hp.rend());
    k=min(k,n);
    long long ans=accumulate(hp.begin()+k, hp.end(), 0ll);
    dunk(ans);
}
//  [cpp]
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef tuple<int,int,int> T;
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define REP(i, n) for (ll i = 0; i < n; ++i)
#define range(i,a,b) ((a)<=(i) && (i)<(b))
#define debug(x) cout << #x << ' ' << '=' << ' ' << (x) << endl;
#define fs first
#define sc second
#define int long long
#define pb push_back
#define MP make_pair
const vector<int> dx = {0, -1, 0, 1, 1, 1, -1, -1};
const vector<int> dy = {1, 0, -1, 0, 1, -1, 1, -1};
const int MOD = (1000000007);
//const int MOD = (998244353);
//const int INF = (1 << 30)-1;
const int INF = (1LL << 60)-1;
const double EPS = (1 >> 30);

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

using Graph = vector<vector<pair<int, int>>>;
using vvec = vector<vector<int>>;
using vec = vector<int>;

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(15);
    //---------------------------------------------
    
    int n,k;
    cin>>n>>k;
    vector<int> h(n);
    REP(i,n) cin >> h[i];
    sort(rall(h));
    rep(i,min(n,k)){
        h[i]=0;
    }
    int s=0;
    rep(i,n){
        s+=h[i];
    }
    cout<<s<<endl;
}
//  [c]
#include <stdio.h>
#include <stdlib.h>
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))
#pragma warning(disable:4996)

int h[3200000];

int compareint(const void* a, const void* b)
{
    int aNum = *(int*)a;
    int bNum = *(int*)b;

    return aNum - bNum;
}


int main()
{
	int n, k;
    unsigned long long a = 0;
    scanf("%d %d", &n, &k);
    for (int i = 0; i != n; i++) {
        scanf("%d", &h[i]);
    }
    qsort(h, SIZE_OF_ARRAY(h), sizeof(int), compareint);

    for (int i = 0; i != n; i++) {
        if (i < k) {
            continue;
        }
        else {
            a += h[3200000 - i - 1];
        }
    }
    printf("%llu", a);

	return 0;
}
//  [c]
#include<stdio.h>
int R=1,C=1,H[2000010],N[2000010];
//評価関数（いまはMIN）
int hyouka(int a,int b){
  if(C<b)return 1;
  if(C<a||b==0)return 0;
  return N[H[a]]<N[H[b]]?1:0;
}
//挿入関数
void hin(int a){
  int i=C++;
  for(N[H[0]=R]=a;hyouka(0,i/2);i/=2)H[i]=H[i/2];
  H[i]=R++;
}
//取り出す関数
int hout(){
  int rt=H[1],i,j=2,k=H[--C];
  for(i=1;hyouka(i,C);i=j)H[i]=H[j=i*2+1-hyouka(i*2,i*2+1)];
  H[j/2]=k;
  return rt;
}
int main(){
  int n,m,a;
  long long s=0; 
  scanf("%d %d",&n,&m);
  m=n-m;
  while(n--){
    scanf("%d",&a);
    hin(a);
  }
  if(m>0){
    while(m--)s+=N[hout()];
  }
  printf("%lld\n",s);
  return 0;
}
//  [javascript]
"use strict";
var GET=(function(){function f(s){return new g(s);}function g(s){this._s=s.trim().split("\n");this._y=0;}g.prototype.a=function(f){var s=this._s, y=this._y, r;if(typeof s[y]==="string")s[y]=s[y].split(" ").reverse();r=s[y].pop();if(!s[y].length)this._y++;return f?r:+r;};g.prototype.l=function(f){var s=this._s[this._y++].split(" ");return f?s:s.map(a=>+a);};g.prototype.m=function(n,f){var r=this._s.slice(this._y,this._y+=n).map(a=>a.split(" "));return f?r:r.map(a=>a.map(a=>+a));};g.prototype.r=function(n,f){var r=this._s.slice(this._y,this._y+=n);return f?r:r.map(a=>+a);};return f;})();
var o=GET(require("fs").readFileSync("/dev/stdin","utf8"));
function xArray(v){var a=arguments,l=a.length,r="Array(a["+--l+"]).fill(0).map(x=>{return "+v+";})";while(--l)r="Array(a["+l+"]).fill(0).map(x=>"+r+")";return eval(r);}

var myOut = main();
if(myOut !== undefined)console.log(myOut);
function main(){
  var n = o.a();
  var k = o.a();
  var h = o.l().sort((a,b)=>b-a);
  var ans = 0;
  for(var i = k; i < n; i++){
    ans += h[i];
  }
  return ans;
}
//  [javascript]
function Main(input) {
  input = input.trim().split('\n');
  K = input[0].split(' ')[1];
  Ni = input[1].split(' ');
  if (K >= Ni.length) {
    console.log('0');
    return;
  }
  console.log(input[1].split(' ').sort((a,b) => b-a).map(Number).reduce((a,v,i) => i < K ? a : a + v, 0));
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
  input = input.trim().split('\n');
  K = input[0].split(' ')[1];
  Ni = input[1].split(' ');
  if (K >= Ni.length) {
    console.log('0');
    return;
  }
  console.log(Ni.sort((a,b) => b-a).map(Number).slice(K).reduce((a,v) => a + v, 0));
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

import (
	"fmt"
	"sort"
)

func main() {
	var n, k int
	fmt.Scan(&n, &k)
	h := make([]int, n)
	for i := 0; i < len(h); i++ {
		fmt.Scan(&h[i])
	}
	sort.Sort(sort.Reverse(sort.IntSlice(h)))

	sum := 0
	for i:=k; i<len(h); i++{
		sum += h[i]
	}

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

import (
	"fmt"
	"sort"
)

func main() {

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

	H := make([]int, N)

	for i := 0; i < N; i++ {
		fmt.Scanf("%d", &H[i])
	}

	sort.Sort(sort.Reverse(sort.IntSlice(H)))

	var count int
	for i := K; i < N; i++ {
		count = count + H[i]
	}

	fmt.Println(count)

}
//  [go]
package main

import (
	"fmt"
	"sort"
)

func main() {
	var n, k int
	fmt.Scanf("%d %d", &n, &k)
	hps := scanIntSlice(n)

	sort.Sort(sort.Reverse(sort.IntSlice(hps)))

	count := 0
	for i := k; i < n; i++ {
		count += hps[i]
	}

	fmt.Printf("%d\n", count)
}

func scanIntSlice(size int) []int {
	input := []int{}
	for i := 0; i < size; i++ {
		var in int
		fmt.Scanf("%d", &in)
		input = append(input, in)
	}
	return input
}
//  [ruby]
input = gets.split
n = input[0].to_i
k = input[1].to_i
arr = gets.split
total = 0

if k >= n
  print 0
else
  arr = arr.sort{|a, b| a.to_i <=> b.to_i }
  size = n - k
  for i in 0...size
    total += arr[i].to_i
  end
  print total
end