jiahuimbzuai/CoQuIR huggingface dataset:
//  [go]
package main

import "fmt"

func main() {
	var N int
	fmt.Scan(&N)
	s := 0
	for i := 0; i < N; i++ {
		var a int
		fmt.Scan(&a)
		s += a - 1
	}
	fmt.Println(s)
}
//  [ruby]
gets; p gets.chomp.split.map{|s| s.to_i - 1}.inject(:+)
//  [ruby]
a=gets.to_i
line=gets.chomp.split.map(&:to_i)
puts line.inject(:+)-a
//  [ruby]
_ = gets
puts gets.chomp.split.map {|i| i.to_i - 1 }.inject(:+)
//  [ruby]
n=gets.to_i
a=gets.split.map(&:to_i)

def modu(m,a)
    f=0
    a.each do|ele|
        f+=m%ele
    end
    return f
end
class Array
def lcm
    self.inject{|a,b| a.lcm(b)}
end
end
ret=0
unchi=a.lcm
for i in unchi-10..unchi
    s=modu(i,a)
    if ret<s
        ret=s
    end
end
p ret
//  [ruby]
def koyakusu(x, y)
  loop do
    k = y % x
    if k == 0
      return x
    end
    y = x
    x = k
  end
end

def kobaisu(x, y)
  return x * y / koyakusu(x, y)
end

n = gets.to_i
array = gets.chomp.split(" ").map(&:to_i);
a = array.dup

(a.size - 1).times do
  a.sort!
  a << kobaisu(a[0], a[1] )
  a.slice!(0..1)
end
m = a[0] - 1
ans = 0
array.each do |i|
  ans += m % i
end
puts ans
//  [ruby]
require 'prime'
n = gets.chomp
a = gets.chomp.split(" ").map(&:to_i)

h = Hash.new(0)

a.each do |i|
  Prime.prime_division(i).each do |n, e|
    h[n] = e if h[n] < e
  end
end

m = 1
h.each do |n, e|
  m *= (n**e)
end

m -= 1

puts a.map{|i| m % i}.inject(:+)
//  [rust]
use std::cmp::*;
use std::io::*;

fn main() {
    let mut s: String = String::new();
    stdin().read_to_string(&mut s).ok();
    let mut itr = s.trim().split_whitespace();
    let n: usize = itr.next().unwrap().parse().unwrap();
    let a: Vec<usize> = (0..n)
        .map(|_| itr.next().unwrap().parse().unwrap())
        .collect();

    let mut ans = 0;
    for &i in a.iter() {
        ans += i - 1;
    }
    println!("{}", ans);
}
//  [rust]
//! ----------------------------------------------
//! Framework <https://github.com/vain0x/procon>
//!
//! See the bottom of file for solution.
//! ----------------------------------------------

#![allow(unused_imports)]
#![allow(non_snake_case)]

use std::cell::RefCell;
use std::cmp::{max, min, Ordering};
use std::collections::*;
use std::fmt::{Debug, Display, Formatter, Write as FmtWrite};
use std::io::{stderr, stdin, BufRead, Write};
use std::mem::{replace, swap};
use std::ops::*;
use std::rc::Rc;

/// Print values to standard error if debug mode.
#[allow(unused_macros)]
macro_rules! debug {
    ($($e:expr),*) => {
        #[cfg(debug_assertions)]
        $({
            let (e, mut err) = (stringify!($e), stderr());
            writeln!(err, "\x1B[33m{}\x1B[0m = {:?}", e, $e).unwrap()
        })*
    };
}

/// Read from standard input and parse each word.
/// - `read!(T, U, ..)` parses a line as a tuple of words.
/// - `read![[T]]` parses a line as an array of words.
/// - `read![..; N]` parses `N` lines, using `read!(..)` repeatedly.
#[allow(unused_macros)]
macro_rules! read {
    ([$t:ty] ; $n:expr) =>
        ((0..$n).map(|_| read!([$t])).collect::<Vec<_>>());
    ($($t:ty),+ ; $n:expr) =>
        ((0..$n).map(|_| read!($($t),+)).collect::<Vec<_>>());
    ([$t:ty]) =>
        (rl().split_whitespace().map(|w| w.parse().unwrap()).collect::<Vec<$t>>());
    ($($t:ty),*) => {{
        let buf = rl();
        let mut w = buf.split_whitespace();
        ($(w.next().unwrap().parse::<$t>().unwrap()),*)
    }};
}

/// Read a line from standard input.
#[allow(dead_code)]
fn rl() -> String {
    let mut buf = String::new();
    stdin().read_line(&mut buf).unwrap();

    #[allow(deprecated)]
    buf.trim_right().to_owned()
}

// -----------------------------------------------
// Solution
// -----------------------------------------------

fn main() {
    let N = read!(usize);
    let a = read![[i64]];

    // m = Πa - 1
    let x = (0..N).map(|i| a[i] - 1).sum::<i64>();

    println!("{}", x)
}
//  [rust]
#[allow(unused_imports)] use proconio::{input, marker::{Bytes, Chars, Usize1, Isize1}};
#[allow(unused_imports)] use std::cmp::{min, max};
#[allow(unused_imports)] use superslice::Ext as _;

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

	let mut ans = 0;
	for i in 0..n {
		ans += a[i] - 1;
	}

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

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

fn main() {
    let a: usize = read!();
    let mut sum: usize = 0;
    for i in 0..a {
        let b: usize = read!();
        sum+=b
    }
    println!("{}",sum-a)
}
//  [rust]
use whiteread::parse_line;

fn main() {
    let _n: usize = parse_line().unwrap();
    let a: Vec<usize> = parse_line().unwrap();

    println!("{}", a.iter().fold(0, |x, y| x + y - 1));
}
//  [swift]
readLine();print(readLine()!.characters.split(" ").reduce(0){$0+Int(String($1))!-1})
//  [swift]
// 🐋💭
import Foundation

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

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

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

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

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

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

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

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

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

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

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

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

func main() {
    let (n, aryA) = (readInt(), readInts())
    //＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿＿ここまで入力
    var ans = 0
    for i in 0..<n {
        ans += aryA[i] - 1
    }
    print(ans)
}

main()
//  [swift]
import Foundation

func main() {
	let n = Int(readLine()!)!
	let inputString = readLine()!
	var split: [Int] = inputString.components(separatedBy: " ").map{Int(String($0))!}
	print(split.reduce(0) { $0 + $1 } - n)
}

main()
//  [typescript]
declare var require: (x: string) => any;

function Main(input: string[]) {
  console.log(input[1].split(' ').map(x => +x - 1).reduce((p, c) => p + c));
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8').split('\n'));
//  [typescript]
function main(input) {
  input = input.trim().split("\n");
  const n = Number(input[0]);
  const as = input[1].split(" ").map(n => Number(n));
  const result = as.reduce((a, b) => a + b) - n;
  console.log(result);
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [typescript]
const stdin = require('fs').readFileSync('/dev/stdin', 'utf8')

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

const a = stdin
  .split('\n')[1]
  .split(' ')
  .map(Number)

console.log(a.map(e => e - 1).reduce((p, c) => p + c))
//  [python]
a = int(input())
if a == 1:
    print("Hello World")
elif a == 2:
	b = int(input())
	c = int(input())
	print(b+c)
//  [python]
N = int(input())


if N == 1:
    print('Hello World')
else:
    A = int(input())
    B = int(input())
    print(A + B)
//  [python]
n=int(input())

if n==1:
    print("Hello World")
else:
    a=int(input())
    b=int(input())
    print(a+b)
//  [python]
# -*- coding: utf-8 -*-
import math,string,itertools,fractions,heapq,collections,re,array,bisect
import numpy as np

N = int(input())

if N == 1:
    print('Hello World')
else:
    A = int(input())
    B = int(input())
    print(A+B)
//  [python]
import numpy as np,math,itertools
n=int(input())
if n==1:print("Hello World")
else:
    a=int(input())
    b=int(input())
    print(a+b)
//  [python]
n = int(raw_input())
if n == 1: print 'Hello World'
elif n == 2: print int(raw_input())+int(raw_input())
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException{
		// TODO Auto-generated method stub
		
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		
		int n = Integer.parseInt(reader.readLine());
		int a,b;
		
		if(n==1)
		{
			System.out.println("Hello World");
		}
		else if(n==2)
		{
		
			a=Integer.parseInt(reader.readLine());
			b=Integer.parseInt(reader.readLine());
			System.out.println(a+b);
			
		}
	}
	

}
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {

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

	public void solve() throws IOException {
		FastScanner fs = new FastScanner();
		int n = fs.nextInt();
		if(n == 1) {
			System.out.println("Hello World");
			return;
		}
		
		int a = fs.nextInt();
		int b = fs.nextInt();
		System.out.println(a+b);
	}

	

	public class FastScanner {

		BufferedReader reader;
		private StringTokenizer st;

		public FastScanner() {
			st = null;
			reader = new BufferedReader(new InputStreamReader(System.in));
		}

		public String next() throws IOException {
			if (st == null || !st.hasMoreElements()) {
				st = new StringTokenizer(reader.readLine());
			}
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			st = null;
			String readLine = null;
			readLine = reader.readLine();
			return readLine;
		}

		public int nextInt() throws NumberFormatException, IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws NumberFormatException, IOException {
			return Long.parseLong(next());
		}

		public int[] nextIntArr(int n) throws NumberFormatException, IOException {
			int[] retArr = new int[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextInt();
			}
			return retArr;
		}

		public long[] nextLongArr(int n) throws NumberFormatException, IOException {
			long[] retArr = new long[n];
			for (int i = 0; i < n; i++) {
				retArr[i] = nextLong();
			}
			return retArr;
		}

		public void close() throws IOException {
			reader.close();
		}
	}

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

public class Main {

    private static final String HELLO_WORLD = "Hello World";

    public static String process(TestCase testCase) {
        final int N = testCase.N;

        switch (N) {
            case 1:
                return HELLO_WORLD;
            case 2: {
                final int A = unsafeGet(testCase.A, "A");
                final int B = unsafeGet(testCase.B, "B");
                return String.valueOf(A + B);
            }
            default: {
                throw unknownN(N);
            }
        }
    }

    private static int unsafeGet(Optional<Integer> argument, String argumentName) {
        return argument.orElseThrow(() -> new IllegalArgumentException("Missing Argument " + argumentName));
    }

    // Util func

    public static void main(String[] args) {
        TestCase testCase = readFromInput();

        final String result = process(testCase);

        output(result);
    }

    private static TestCase readFromInput() {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();

        switch (N) {
            case 1: {
                sc.close();
                return new TestCase(N);
            }
            case 2: {
                int A = sc.nextInt();
                int B = sc.nextInt();
                sc.close();
                return new TestCase(N, A, B);
            }
            default: {
                throw unknownN(N);
            }
        }
    }

    private static IllegalArgumentException unknownN(int N) {
        return new IllegalArgumentException("Unknown N: " + N);
    }

    private static void output(String result) {
        System.out.println(result);
    }

    public static class TestCase {
        final int N;
        final Optional<Integer> A;
        final Optional<Integer> B;

        public TestCase(int N) {
            this.N = N;
            this.A = Optional.empty();
            this.B = Optional.empty();
        }

        public TestCase(int N, int A, int B) {
            this.N = N;
            this.A = Optional.of(A);
            this.B = Optional.of(B);
        }
    }
}
//  [java]
import java.util.Scanner;

class Main {
	public static void main(String args[]) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		
		if(n == 1) {
			System.out.println("Hello World");
		}else {
			int a = sc.nextInt();
			int b = sc.nextInt();
			System.out.println(a+b);
		}
	}
}
//  [cpp]
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int n,a,b;
int main()
{
    scanf("%d",&n);
    if(n==1)printf("Hello World");
    else{
    	scanf("%d%d",&a,&b);
    	printf("%d",a+b);
	}
    return 0;
}
//  [cpp]
#include<iostream>

int main(){
	int inp;
	std::cin>>inp;

	//inpの値で条件分岐
	if(inp==1){
		std::cout<<"Hello World"<<std::endl;
	} else if(inp==2){
		int A,B;
		std::cin>>A>>B;
		std::cout<<A+B<<std::endl;
	}

	return 0;
}
//  [cpp]
#include<stdio.h>
 
 
int main(void){
 
 int n,a,b;
 scanf("%d",&n);
 if(n==1){
 printf("Hello World\n");
}
else{
 scanf("%d %d",&a,&b);
  printf("%d\n",a+b);
}
 
 
return 0;
 
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
#define ll long long

int main(){
	
	int n;
	cin>>n;
	if (n==1){
		cout<<"Hello World"<<endl;
	}else{
		int a,b;
		cin>>a>>b;
		cout<<a+b<<endl;
	}
	
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
 
#define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i)
#define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define irep(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define ireps(i, m, n) for (int i = (int)(m); i <= (int)(n); ++i)
#define FOR(e, c) for (auto &e : c)
#define SORT(v, n) sort(v, v + n);
#define vsort(v) sort(v.begin(), v.end());
#define rvisort(v) sort(v.begin(), v.end(), greater<int>());
#define all(v) v.begin(), v.end()
#define mp(n, m) make_pair(n, m);
#define cout(d) cout<<d<<endl;
#define coutd(d) cout<<std::setprecision(10)<<d<<endl;
#define cinline(n) getline(cin,n);
 
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using pii = pair<int, int>;
using vpii = vector<pii>;
using vs = vector<string>;
using vd = vector<double>;
using ul = unsigned long;
 
template<class T, class C> void chmax(T& a, C b){ a>b?:a=b; }
template<class T, class C> void chmin(T& a, C b){ a<b?:a=b; }
 
const int mod=1e9+7;
 
struct mint {
  ll x;
  mint(ll x=0):x(x%mod){}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res+=a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res-=a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res*=a;
  }
};
 
mint c[4005][4005];
void init() {
  c[0][0] = 1;
  for (int i = 0; i <= 4000; i++) {
    for (int j = 0; j <= i; j++) {
      c[i+1][j] += c[i][j];
      c[i+1][j+1] += c[i][j];
    }
  }
}
mint comb(int n, int k) {
  return c[n][k];
}
 
bool IsPrime(int num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false;
 
    double sqrtNum = sqrt(num);
    for (int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            return false;
        }
    }
 
    return true;
}
 
map<ll, ll> primeFact(ll n) {
  map<ll, ll> res;
  for (ll i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      res[i]++;
      n /= i;
    }
  }
  if (n != 1) res[n]++;
  return res;
}
 
void printv(vi& v){
  rep(i,v.size()) cout << v[i] << " ";
  cout << endl;
}
void printv(vll& v){
  rep(i,v.size()) cout << v[i] << " ";
  cout << endl;
}
int vtotal(vi& v){
  int total=0;
  rep(i,v.size()) total+=v[i];
  return total;
}
 
int main()
{
  //init(); // mint初期化
  cin.tie( 0 );
  ios::sync_with_stdio( false );
 
  int n;
  cin>>n;
  if(n==1){
    cout("Hello World");
  }else{
    int a,b;cin>>a>>b;
    cout(a+b);
  }
  
  return 0;
}
//  [cpp]
#include<cstdio>
#include<cstdlib>
#include<iostream>

using namespace std;

int main()
{
	int i_temp,i_a,i_b;
	cin>>i_temp;
	if(i_temp==1)  cout<<"Hello World";
	else
	{
		cin>>i_a>>i_b;
		cout<<i_a+i_b;
	}
	return 0;
 }
//  [c]
#include<stdio.h>

int main(void)
{
	int n,a,b;
	scanf("%d",&n);
	if(n==1)
		printf("Hello World ");
	else{
		scanf("%d%d",&a,&b);
		printf("%d",a+b);
	}
	return 0;
}
//  [c]
#include <stdio.h>
 
int main(){
    int x,a,b;
    scanf("%d",&x);
    if(x==1){
        printf("Hello World\n");
    }else if(x==2){
        scanf("%d %d",&a,&b);
        printf("%d\n",a+b);
    }
    return 0;
}
//  [c]
#include <stdio.h>

int main()
{
  char a,b,c;
  scanf("%d",&b);
  if (b == 1)
  	printf("Hello World");
  else
  {
    scanf("%d",&a);
    scanf("%d",&c);
    printf("%d",a+c);
  }
}
//  [c]
main(){system("perl -e\"<>;print<>+<>||'Hello World'\"");}
//  [c]
#include <stdio.h>

int main(void)
{
	int a,b,c;
	scanf("%d",&a);
	if(a==1){
		printf("Hello World");
	}else{
		scanf("%d %d",&b,&c);
		printf("%d",b+c);
	}
	return 0;
}
//  [c]
#include <stdio.h>

int main()
{
	int N;
	scanf("%d",&N);
	if(N == 1){
		printf("Hello World");
	}
	if(N == 2){
		int A,B;
		scanf("%d %d",&A,&B);
		printf("%d",A+B);
	}
	return 0;
}
//  [javascript]
function Main(input){
  var arr = input.split("\n");
  var n = parseInt(arr[0],10);
  if(n == 1){
    console.log('Hello World');
  }
  else if(n == 2){
    var a = parseInt(arr[1],10);
    var b = parseInt(arr[2],10);
    var sum = a + b;
    console.log(sum);
  }
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
inp = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n')
N = inp.shift() * 1
A = inp.shift() * 1
B = inp.shift() * 1
console.log(N == 1 ? 'Hello World' : A + B)
//  [javascript]
function Main(input) {
  input = input.trim()
  input = input.split("\n").map(Number);
  if(input[0]==1) console.log("Hello World")
  else console.log(input[1]-0+input[2])
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
  var data = input.split("\n");
  var N = parseInt(data[0]);
  var A = parseInt(data[1]);
  var B = parseInt(data[2]);

  if (N === 1){
    console.log('Hello World');
  } else {
    console.log(A + B);
  }
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function toNum (str) {
	return parseInt(str, 10);
}

// inputに入力データ全体が入る
function Main(input) {
	var N = toNum(input.split('\n')[0]);
	var A = toNum(input.split('\n')[1]);
	var B = toNum(input.split('\n')[2]);
	if ( N === 1 ) {
		console.log('Hello World');
	} else if ( N === 2 ) {
		console.log('%d', A+B);
	}
}

// ※この行以降は編集しない (標準入力から一度に読み込みMainを呼び出します)
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
function Main(input) {
  input = input.split("\n");
  var n = input[0];
  var ans;
  if(n==1){
    ans="Hello World";
  }else{
    var a= parseInt(input[1]);
    var b= parseInt(input[2]);
    ans=a+b;
  }
  console.log('%s', ans);
}
  
// "実行する"ボタンを押した時に実行される関数 (デバッグ用)
function debug(){
  var input = document.getElementById("input").value;
  Main(input);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [go]
package main

import "fmt"

func main() {
	var n int
	fmt.Scan(&n)
	switch n {
	case 1:
		fmt.Println("Hello World")
	case 2:
		var a, b int
		fmt.Scan(&a, &b)
		fmt.Println(a + b)
	}
}
//  [go]
package main

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

func main() {
	if ReadInt() == 1 {
		fmt.Println("Hello World")
	} else {
		fmt.Println(ReadInt() + ReadInt())
	}
}

var reader = bufio.NewReader(os.Stdin)

func Scan(a ...interface{}) {
	if _, err := fmt.Fscan(reader, a...); err != nil {
		panic(err)
	}
}
func ReadInt() (i int) { Scan(&i); return }
//  [go]
package main

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

var sc, wr = bufio.NewScanner(os.Stdin), bufio.NewWriter(os.Stdout)

func scanString() string   { sc.Scan(); return sc.Text() }
func scanRunes() []rune    { return []rune(scanString()) }
func scanInt() int         { a, _ := strconv.Atoi(scanString()); return a }
func scanInt64() int64     { a, _ := strconv.ParseInt(scanString(), 10, 64); return a }
func scanFloat64() float64 { a, _ := strconv.ParseFloat(scanString(), 64); return a }

func scanInts(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = scanInt()
	}
	return res
}

func debug(a ...interface{}) { fmt.Fprintln(os.Stderr, a...) }

func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}
func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

//•*¨*•.¸¸♪main•*¨*•.¸¸♪(　-ω-)ノ　(　・ω・)
func main() {
	defer wr.Flush()
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 10000), 1001001)

	n := scanInt()
	if n == 1 {
		fmt.Fprintln(wr, "Hello World")
	} else {
		fmt.Fprintln(wr, scanInt()+scanInt())
	}
}
//  [go]
package main

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

func main() {
	r := bufio.NewReader(os.Stdin)
	s, _ := r.ReadString('\n')
	s = strings.TrimRight(s, " \t\n")
	N, _ := strconv.Atoi(s)

	if N == 1 {
		fmt.Println("Hello World")
	} else if N == 2 {
		s, _ = r.ReadString('\n')
		s = strings.TrimRight(s, " \t\n")
		A, _ := strconv.Atoi(s)
		s, _ = r.ReadString('\n')
		s = strings.TrimRight(s, " \t\n")
		B, _ := strconv.Atoi(s)
		fmt.Println(A + B)
	}

}
//  [ruby]
# abc112 A
n = gets.to_i
if n == 1
  puts "Hello World"
else
  puts gets.to_i + gets.to_i
end
//  [ruby]
n=gets.to_i

if n == 1
  puts "Hello World"
else
  a=gets.to_i
  b=gets.to_i
  puts a + b
end
//  [ruby]
n = gets.to_i
case n
when 1
  puts "Hello World"
when 2
  a = gets.to_i
  b = gets.to_i
  puts a + b
end
//  [ruby]
n = gets.to_i
if n == 1
  puts 'Hello World'
else
  a = gets.to_i
  b = gets.to_i
  puts a + b
end
//  [ruby]
#!/usr/bin/env ruby

require 'set'

class Hash
  def push(key, value)
    self[key] = [] if self[key] == nil
    self[key].push(value)
  end
end

class Array
  def lower_bound(value)
    left = -1;
    right = self.length;
    while left + 1 < right
      mid = left + (right - left) / 2;
      if self[mid] >= value
        right = mid
      else
        left = mid
      end
    end
    right
  end

  def unique
    res = [self.first]
    each_cons(2) do |a, b|
      if a != b
        res.push(b)
      end
    end
    res
  end
end

def get_ints
  gets.chomp.split.map(&:to_i)
end

def get_ints_minus_one
  get_ints.map { |x| x - 1 }
end

def get_int
  gets.chomp.to_i
end

X = get_int

if X == 1
  puts 'Hello World'
else
  A = get_int
  B = get_int

  puts A + B
end
//  [ruby]
n=gets.to_i
if n==1
  puts "Hello World"
else
  puts (gets.to_i)+(gets.to_i)
end
//  [rust]
use std::io::*;
use std::str::FromStr;

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

fn main() {
    let n: usize = read();
    if n == 1 {
        println!("Hello World");
    } else {
        let a: usize = read();
        let b: usize = read();
        println!("{}", a + b);
    }
}
//  [rust]
#![allow(unused_imports, unused_macros, dead_code)]

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

const M: i64 = 1_000_000_007;

fn main() {
    let mut sc = Scanner::new();
    let n: usize = sc.cin();
    if n == 1 {
        put!("Hello World");
    } else {
        put!(sc.cin::<i64>() + sc.cin::<i64>());
    }
}

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

struct Scanner { stdin: io::Stdin, buffer: VecDeque<String>, }
impl Scanner {
    fn new() -> Self { Scanner { stdin: io::stdin(), buffer: VecDeque::new() } }
    fn cin<T: FromStr>(&mut self) -> T {
        while self.buffer.len() == 0 {
            let mut line = String::new();
            let _ = self.stdin.read_line(&mut line);
            for w in line.split_whitespace() {
                self.buffer.push_back(String::from(w));
            }
        }
        self.buffer.pop_front().unwrap().parse::<T>().ok().unwrap()
    }
    fn chars(&mut self) -> Vec<char> { self.cin::<String>().chars().collect() }
    fn vec<T: FromStr>(&mut self, n: usize) -> Vec<T> { (0..n).map(|_| self.cin()).collect() }
}
//  [rust]
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();
	if v[0] == 1 {
		println!("Hello World");
	}else{
		let v:Vec<i32> = procon_read();
		let a = v[0];
		let v:Vec<i32> = procon_read();
		let b = v[0];
		println!("{}", a+b);
	}
}
//  [rust]
use proconio::{fastout, input};

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

    println!(
        "{}",
        if n == 1 {
            "Hello World".to_string()
        } else {
            input!(a: usize, b: usize);
            (a + b).to_string()
        }
    );
}
//  [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 n: usize = iterator.next().unwrap().parse().unwrap();

    if n == 1 {
        return "Hello World".to_string();
    }

    let a: usize = iterator.next().unwrap().parse().unwrap();
    let b: usize = iterator.next().unwrap().parse().unwrap();

    return (a + b).to_string();
}
//  [swift]
print(readLine()!=="1" ?"Hello World":Int(readLine()!)!+Int(readLine()!)!)
//  [swift]
import Foundation

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

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



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

let N = readInt()!
print(N == 1 ? "Hello World" : readInt()!+readInt()!)
//  [swift]
if readLine() == "1" { print("Hello World") }
else {
  print((1...2).map { _ in Int(readLine()!)! }.reduce(0, +))
}
//  [typescript]
 import * as fs from 'fs';

namespace AtCoder.abc112 {

    class Program {
        /**
         * in
         *
         * out
         *
         */
        main(inp: string): void {

            const [n, a, b]: number[] = inp.split('\n').map(Number);

            if (n === 1) {
                console.log('Hello World');
            } else if (n === 2) {
                console.log(a + b);
            }
        }
    }

    const prg = new Program();
    prg.main(fs.readFileSync('/dev/stdin', 'utf8').trim());
}
//  [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[])=>{for(let i=0;i<a.length;i+=2)if(s==a[i])return a[i+1]};const or=(a,...b)=>{for(let i=0;i<b.length;i++)if(a==b[i])return true;return false};
const main = ()=>{
  out(nin()===1?'Hello World':nin()+nin());
}
main();
//  [typescript]
const stdin = require('fs').readFileSync('/dev/stdin', 'utf8')

const [n, a, b] = stdin.split('\n')

if(n==='1'){
  console.log('Hello World')
} else {
  console.log(Number(a) + Number(b))
}
//  [typescript]
import { readFileSync } from "fs";

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

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

  if (N === 1) {
    return "Hello World";
  } else {
    const A = Number(input[1][0]);
    const B = Number(input[2][0]);

    return A + B;
  }
};

console.log(main(read()));
//  [python]
n = input()
n = n.replace('1','x')
n = n.replace('9','1')
n = n.replace('x','9')
print(n)
//  [python]
print(input().replace("1","x").replace("9",'1').replace("x","9"))
//  [python]
n=input()
ans=100*(10-int(n[0]))+10*(10-int(n[1]))+(10-int(n[2]))
print(ans)
//  [python]
import numpy as np
import math

# K = int(input())
# N, K = map(int, input().split())
# A = list(map(int, input().split()))
# S = input() # String
# DP = np.zeros((N, Y), dtype=int)

N = list(map(int, input()))

for i in range(3):
    if N[i] == 1:
        N[i] = 9
    elif N[i] == 9:
        N[i] = 1

print(N[0],N[1],N[2], sep='')
//  [python]
# -*- coding: utf-8 -*-
import math,string,itertools,fractions,heapq,collections,re,array,bisect
import numpy as np

N = input()
ans = ''
for n in N:
    if n == '1':
        ans += '9'
    else:
        ans += '1'
print(ans)
//  [python]
import numpy as np

x = input()
x = str(x)
y = 0
z = len(x)
for i in range(z):
  if x[i] == '1':
    y = y + 9 * (10 ** (z - i - 1))
  else:
    y = y + 1 * (10 ** (z - i - 1))
print(y)
//  [java]
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main{
	public static void main(String[] args)throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String s = br.readLine();
		s = s.replace('1','x');
		s = s.replace('9','1');
		s = s.replace('x','9');
		System.out.println(s);
	}
}
//  [java]
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) {
        try {
            // 標準入力
            InputStreamReader isr = new InputStreamReader(System.in);
            BufferedReader br = new BufferedReader(isr);
            String s = br.readLine();
            StringBuffer strBuf = new StringBuffer();
            for (int i = 0; i < s.length(); i++) {
                char ch = s.charAt(i);
                if (ch == '1') {
                    strBuf.append("9");
                } else if (ch == '9') {
                    strBuf.append("1");
                } else {
                    strBuf.append(ch);
                }
            }
            System.out.println(strBuf.toString());
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
//  [java]
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.NoSuchElementException;
import java.util.Random;

class Main {
	public static void main(String[] args) {
		new Main().run();
	}
	
	void run() {
		FastScanner sc=new FastScanner();
		PrintWriter pw=new PrintWriter(System.out);
		char[] cs=sc.next().toCharArray();
		for(int i=0;i<cs.length;++i) {
			if(cs[i]=='1')cs[i]='9';
			else if(cs[i]=='9')cs[i]='1';
		}
		pw.println(String.valueOf(cs));
		pw.close();
	}

	
	static void tr(Object... objects) {
		System.out.println(Arrays.deepToString(objects));
	}

}


class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    public int nextInt() {
    	return Integer.parseInt(next());
    }
    
    public long nextLong() {
    	return Long.parseLong(next());
    }
}
//  [java]
import java.io.*;
import java.util.Arrays;
import java.util.StringTokenizer;

public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    try {
      main.run(args);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }

  private void run(String[] arguments) throws Exception {
    MyScanner sc = new MyScanner();
    PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));

    sc.nextLine()
        .chars()
        .mapToObj(value -> (char) value)
        .map(
            c -> {
              char result = '0';
              switch (c) {
                case '1':
                  result = '9';
                  break;
                case '9':
                  result = '1';
                  break;
              }
              return result;
            })
        .forEach(out::print);
    out.println();
    out.close();
  }

  /*
   * Form: http://codeforces.com/blog/entry/7018
   */
  private class MyScanner {
    BufferedReader br;
    StringTokenizer st;

    MyScanner() {
      br = new BufferedReader(new InputStreamReader(System.in));
    }

    String next() {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

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

    long nextLong() {
      return Long.parseLong(next());
    }

    double nextDouble() {
      return Double.parseDouble(next());
    }

    String nextLine() {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }
      return str;
    }
  }
}
//  [java]
import java.util.Scanner;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @author shengboxu
 */

public class Main {
    public static void main(String [] args)
    {
        Scanner sc = new Scanner(System.in);
        String str = sc.next();
    
        System.out.println(Stream.of(str.split(""))
                .map(e -> e.compareTo("9") == 0 ? "1" : "9")
                .collect(Collectors.joining("")));
    }
}
//  [cpp]
#include <stdio.h>
#include <stdlib.h>

#define NMAX 2000000

main()
{
  int n;
  scanf("%d",&n);
  printf("%d\n",1110-n);
}
//  [cpp]
#include<stdio.h>
#define fo(i,a,b) for(int i=a;i<=b;i++)
char s[5];
int main(){
	scanf("%s",s);
	fo(i,0,2) s[i]=10-(s[i]-'0')+'0';
	fo(i,0,2) putchar(s[i]);putchar('\n');
}
//  [cpp]
#include <bits/stdc++.h>
using namespace std;
 
#define rep(i, n) for (int i = (int)(0); i < (int)(n); ++i)
#define reps(i, n) for (int i = (int)(1); i <= (int)(n); ++i)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i > 0; i--)
#define irep(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define ireps(i, m, n) for (int i = (int)(m); i <= (int)(n); ++i)
#define FOR(e, c) for (auto &e : c)
#define SORT(v, n) sort(v, v + n);
#define vsort(v) sort(v.begin(), v.end());
#define rvisort(v) sort(v.begin(), v.end(), greater<int>());
#define all(v) v.begin(), v.end()
#define mp(n, m) make_pair(n, m);
#define cout(d) cout<<d<<endl;
#define coutd(d) cout<<std::setprecision(10)<<d<<endl;
#define cinline(n) getline(cin,n);
 
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using pii = pair<int, int>;
using vpii = vector<pii>;
using vs = vector<string>;
using vd = vector<double>;
using ul = unsigned long;
 
template<class T, class C> void chmax(T& a, C b){ a>b?:a=b; }
template<class T, class C> void chmin(T& a, C b){ a<b?:a=b; }
 
const int mod=1e9+7;
 
struct mint {
  ll x;
  mint(ll x=0):x(x%mod){}
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod-a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res+=a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res-=a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res*=a;
  }
};
 
mint c[4005][4005];
void init() {
  c[0][0] = 1;
  for (int i = 0; i <= 4000; i++) {
    for (int j = 0; j <= i; j++) {
      c[i+1][j] += c[i][j];
      c[i+1][j+1] += c[i][j];
    }
  }
}
mint comb(int n, int k) {
  return c[n][k];
}
 
bool IsPrime(int num)
{
    if (num < 2) return false;
    else if (num == 2) return true;
    else if (num % 2 == 0) return false;
 
    double sqrtNum = sqrt(num);
    for (int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            return false;
        }
    }
 
    return true;
}
 
map<ll, ll> primeFact(ll n) {
  map<ll, ll> res;
  for (ll i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      res[i]++;
      n /= i;
    }
  }
  if (n != 1) res[n]++;
  return res;
}
 
void printv(vi& v){
  rep(i,v.size()) cout << v[i] << " ";
  cout << endl;
}
void printv(vll& v){
  rep(i,v.size()) cout << v[i] << " ";
  cout << endl;
}
int vtotal(vi& v){
  int total=0;
  rep(i,v.size()) total+=v[i];
  return total;
}
 
int main()
{
  //init(); // mint初期化
  cin.tie( 0 );
  ios::sync_with_stdio( false );
 
  string n;
  cin>>n;
  if(n[0]=='1')n[0]='9';
  else n[0]='1';
  if(n[1]=='1')n[1]='9';
  else n[1]='1';
  if(n[2]=='1')n[2]='9';
  else n[2]='1';
  cout(n);
  return 0;
}
//  [cpp]
#include <bits/stdc++.h>
#define INF 2147483647
#define INF_LL 9223372036854775807
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;

int main() {
	string N;
	cin >> N;
	for (int i = 0; i < N.size(); i++) {
		if (N[i] - '0' == 1)N[i] = 9 + '0';
		else if (N[i] - '0' == 9)N[i] = 1 + '0';
	}
	cout << N << endl;
	return 0;
}
//  [cpp]
#include<bits/stdc++.h>
using namespace std;
int main(){
  string n;
  cin >> n;
  for(int i=0;i<3;i++){
    if(n.at(i)=='1'){
      n.at(i)='9';
    }
    else {
      n.at(i)='1';
    }
  }
  cout << n << endl;
}
//  [c]
#include <stdio.h>
int main(void){
	char a[4];
	scanf("%s",a);
	int i;
	for(i=0;i<3;i++){
		if(a[i]=='1') a[i]='9';
		else if(a[i]=='9') a[i]='1';
	}
	printf("%c%c%c",a[0],a[1],a[2]);
	return 0;
}
//  [c]
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
 
int main()
{
  int a, b, c, d, X, Y;
  int D, G;
  //char s[101][101]={};
  char sv[101]={};
  char ss[101]={};
//  char s_temp[101]={};
  char t[101]={};
//  char s[10000000000000000001]={};
  char s[2][100001]={};
  int len=0;
  int N, M;
//  int A[1000000001]={};
  int A[10001]={};
//  long int A[1001]={};
  int B[20000]={};
  int C[20000]={};
  int i,j,k;
  int flag=0;
  int tmp=0;
  int min=0;
  int cnt=0;
  int max=0;
//  int ans=0;
  int str_len=0;
//  char alp[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
  int ans[2][26]={};


  scanf("%d", &a);
  
  printf("%d\n", 1110-a);
  
  
//  printf("%d\n", (max*10)+tmp+min);
   
//   printf("%d\n",a-b+1);
  
return 0;
}
//  [c]
#include<stdio.h>
int main(){
    int ch;
    int i;
    for(i=0;i<3;i++){
        ch=getchar();
        if(ch=='1'){
            putchar('9');
        } else {
            putchar('1');
        }
    }
    return 0;
}
//  [c]
#include <stdio.h>

int henkan(int n);

int main(void)
{
      int n;
      scanf("%d", &n);
      henkan(n);
      return 0;
}

int henkan(int n)
{
      n=1110-n;
      printf("%d\n", n);
      return 0;
}
//  [c]
#include<stdio.h>
 int main(void)
 {
     int n;
     int s1,s2,s3;

     scanf("%d",&n);

     if(n/100==1) s1=900;
     else s1=100;
     if((n%100)/10==1) s2=90;
     else s2=10;
     if((n%100)%10==1) s3=9;
     else s3=1;

     printf("%d\n",s1+s2+s3);

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

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

//qsort(str, n, sizeof(int), up_comp);
int up_comp(const void *a, const void *b){return *(int*)a - *(int*)b;}
int down_comp(const void *a, const void *b){return *(int*)b - *(int*)a;}
int int_sort( const void * a , const void * b ) {return strcmp(( char * )a , ( char * )b );}
int count_digit(int a){int i=0;while(a!=0){a=a/10;i++;}return i;}
int euclid( int a, int b ){int temp;if(a<b){temp=a;a=b;b=temp;}if(b<1)return -1;if(a%b==0) return b;return euclid(b,a%b);}

int main(void){
 
    char a[3];
    
    scanf("%s", a);
    
    rep(i, 3){
        if (a[i]=='1') {
            a[i]='9';
        } else if (a[i]=='9') {
            a[i]='1';
        }
    }
    
    printf("%s", a);
    
    return 0;
}
//  [javascript]
"use strict";
var input=require("fs").readFileSync("/dev/stdin","utf8");
var cin=input.split(/ |\n/),cid=0;
function next(){return +cin[cid++];}
function nextstr(){return cin[cid++];}
function nextbig(){return BigInt(cin[cid++]);}
function nexts(n,a){return a?cin.slice(cid,cid+=n):cin.slice(cid,cid+=n).map(a=>+a);}
function nextm(h,w,a){var r=[],i=0;if(a)for(;i<h;i++)r.push(cin.slice(cid,cid+=w));else for(;i<h;i++)r.push(cin.slice(cid,cid+=w).map(a=>+a));return r;}
function xArray(v){var a=arguments,l=a.length,r="Array(a["+--l+"]).fill().map(x=>{return "+v+";})";while(--l)r="Array(a["+l+"]).fill().map(x=>"+r+")";return eval(r);}

var myOut = main();
if(myOut !== undefined)console.log(myOut);

function main(){
  return 1110-next();
}
//  [javascript]
function Main(input) {
  input = input.trim()
  for(var i=0;i<3;i++) input = input.replace( "9","#" )
  for(var j=0;j<3;j++) input = input.replace( "1","9" )
  for(var k=0;k<3;k++) input = input.replace( "#","1" )
  console.log(input)
}Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]

function main(input){
    d=input.split('');
    //console.log(d)
    var a='';
    for (var i=0;i<3;i++){
        a+=10-d[i];
    }
    console.log(a);


}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
//  [javascript]
function Main(input) {
  input = input.split("\n");
  var n = input[0];
  n=n.replace(/9/g,2);
  n=n.replace(/1/g,9);
  n=n.replace(/2/g,1);
  console.log('%s', n);
}
  
// "実行する"ボタンを押した時に実行される関数 (デバッグ用)
function debug(){
  var input = document.getElementById("input").value;
  Main(input);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
//  [javascript]
'use strict';

function Main(input) {
  const N = input.split("");
  let answer = [];

  for (let val of N) {
    if (val == 1) {
      answer.push(9);
    } else if (val == 9) {
      answer.push(1);
    }
  }

  console.log(answer.join(""))

};

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim());
//  [javascript]
function convert(input){
   return String(input).replace(/[0-9]/g,function (n){
	if( n == 9 ) return 1;
	return 9
   });
}

console.log(convert(require("fs").readFileSync("/dev/stdin", "utf8")));
//  [go]
package main

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

var sc = bufio.NewScanner(os.Stdin)

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

func nextInt() int {
	sc.Scan()
	i, _ := strconv.Atoi(sc.Text())
	return i
}

func nextFloat64() float64 {
	f, _ := strconv.ParseFloat(next(), 64)
	return f
}

func nextInts(n int) []int {
	slice := make([]int, n)
	for i := 0; i < n; i++ {
		slice[i] = nextInt()
	}
	return slice
}

func main() {
	sc.Split(bufio.ScanWords)
	s := next()
	for _, v := range s {
		if v == '1' {
			v = '9'
		} else if v == '9' {
			v = '1'
		}
		fmt.Printf("%c", v)
	}
	fmt.Printf("\n")
}